/* Pro Gallery Lightbox — Report sheet
 * Same layered sheet as the statistics panel: same width, same distance from
 * the top, rises smoothly from the bottom. Same palette (yellow #ffc809 /
 * greys, light + dark). Two channels: Email and Telegram. */

/* ---------- Trigger button (inside the lightbox) ---------- */
button#pgl-report:focus-visible {
    outline: 2px solid #ffc809;
    outline-offset: 3px;
}

/* ---------- Panel shell ---------- */
.pgl-report-panel {
    --rp-accent: #ffc809;
    --rp-accent-line: #f0b400;
    --rp-accent-ink: #1a1a1a;
    --rp-head: #f5f5f5;
    --rp-head-line: #ddd;
    --rp-bg: #fff;
    --rp-tile: #f5f5f5;
    --rp-tile-line: #ededed;
    --rp-icon-bg: #fff;
    --rp-fg: #2a2a2a;
    --rp-mut: #666;
    --rp-ease: cubic-bezier(.22, 1, .36, 1);
    --rp-top: 108px;
    position: fixed;
    inset: 0;
    z-index: 100010;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .55s;
}
[data-theme='dark'] .pgl-report-panel {
    --rp-head: #2a2a2a;
    --rp-head-line: #484848;
    --rp-bg: #333;
    --rp-tile: #2a2a2a;
    --rp-tile-line: #484848;
    --rp-icon-bg: #333;
    --rp-fg: #ebebeb;
    --rp-mut: #cdcdcd;
}
.pgl-report-panel.is-open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}
.pgl-report-panel.is-instant,
.pgl-report-panel.is-instant * {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}
.pgl-report-panel *,
.pgl-report-panel *::before,
.pgl-report-panel *::after {
    box-sizing: border-box;
}
.pgl-report-panel h3,
.pgl-report-panel h4,
.pgl-report-panel p {
    margin: 0;
    padding: 0;
    letter-spacing: normal;
    text-transform: none;
}
.pgl-report-panel i {
    font-style: normal;
}
.pgl-report-panel button,
.pgl-report-panel a {
    font: inherit;
    margin: 0;
    box-shadow: none;
    text-transform: none;
    text-shadow: none;
}

.pgl-rp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    opacity: 0;
    transition: opacity .45s ease;
}
.pgl-report-panel.is-open .pgl-rp-backdrop {
    opacity: 1;
}

.pgl-rp-sheet {
    position: absolute;
    top: var(--rp-top);
    bottom: 0;
    left: 65px;
    width: calc(100% - 130px);
    display: flex;
    flex-direction: column;
    background: var(--rp-bg);
    color: var(--rp-fg);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 36px rgba(0, 0, 0, .35);
    transform: translateY(105%);
    transition: transform .55s var(--rp-ease);
    will-change: transform;
    overflow: hidden;
}
.pgl-report-panel.is-open .pgl-rp-sheet {
    transform: translateY(0);
}

.pgl-lightbox.pgl-report-open .pgl-lightbox-modal {
    filter: brightness(.7);
    overflow: hidden;
    transition: filter .5s ease;
}

/* ---------- Header ---------- */
.pgl-rp-header {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 15px;
    background: var(--rp-head);
    border-bottom: 1px solid var(--rp-head-line);
    border-radius: 12px 12px 0 0;
    touch-action: none;
}
.pgl-rp-headline {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 1em;
    color: var(--rp-fg);
}
.pgl-rp-headline h3 {
    flex: none;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
    color: var(--rp-fg);
}
.pgl-rp-headline p {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1em;
    font-weight: 400;
    color: var(--rp-mut);
}
.pgl-rp-headline p:not(:empty)::before {
    content: "·";
    margin-right: 8px;
}
.pgl-rp-close {
    flex: none;
    border: 0;
    border-radius: 0;
}
.pgl-rp-close:focus-visible {
    outline: 2px solid var(--rp-fg);
    outline-offset: 2px;
}

/* ---------- Scroll area: content sits centred in the sheet ---------- */
.pgl-rp-scroll {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 20px 28px;
}
.pgl-rp-content {
    width: 100%;
    max-width: 880px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.pgl-report-panel.is-open .pgl-rp-content {
    animation: pglRpRise .6s .12s var(--rp-ease) both;
}

.pgl-rp-lead h4 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rp-fg);
}
.pgl-rp-lead p {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--rp-mut);
}

/* ---------- Wallpaper link row ---------- */
.pgl-rp-ref {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px 8px 8px 14px;
    background: var(--rp-tile);
    border: 1px solid var(--rp-tile-line);
    border-radius: 10px;
}
.pgl-rp-ref-ico {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--rp-fg);
}
.pgl-rp-ref-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pgl-rp-ref-text b {
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-fg);
}
.pgl-rp-ref-url {
    direction: ltr;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: var(--rp-mut);
}

/* ---------- Buttons ---------- */
.pgl-rp-copy {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    background: var(--rp-bg) !important;
    color: var(--rp-fg);
    border: 1px solid var(--rp-tile-line);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}
.pgl-rp-copy svg {
    width: 16px;
    height: 16px;
    flex: none;
}
.pgl-rp-copy:hover {
    border-color: var(--rp-accent);
}
.pgl-rp-copy:focus-visible {
    outline: 2px solid var(--rp-fg);
    outline-offset: 2px;
}
.pgl-rp-copy.is-done {
    background: var(--rp-accent) !important;
    border-color: var(--rp-accent);
    color: var(--rp-accent-ink);
}

/* ---------- Channel cards ---------- */
.pgl-rp-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.pgl-rp-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    background: var(--rp-tile);
    border: 1px solid var(--rp-tile-line);
    border-radius: 12px;
    transition: border-color .25s ease, transform .25s var(--rp-ease);
}
.pgl-rp-card:hover,
.pgl-rp-card:focus-within {
    border-color: var(--rp-accent);
}
.pgl-rp-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.pgl-rp-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    background: var(--rp-icon-bg);
    border: 1px solid var(--rp-tile-line);
    border-radius: 14px;
    color: var(--rp-fg);
}
.pgl-rp-icon svg {
    width: 28px;
    height: 28px;
}
.pgl-rp-card-title {
    min-width: 0;
}
.pgl-rp-card-title h4 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rp-fg);
}
.pgl-rp-addr {
    direction: ltr;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
    font-size: 14px;
    color: var(--rp-mut);
}
.pgl-rp-card-desc {
    flex: 1 1 auto;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--rp-mut);
}
.pgl-rp-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pgl-rp-go {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    background: var(--rp-accent);
    color: var(--rp-accent-ink) !important;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 6px 20px #00000026 !important;
    transition: transform .2s ease, background-color .2s ease;
}
.pgl-rp-go svg {
    width: 18px;
    height: 18px;
    flex: none;
}
.pgl-rp-go:hover {
    background: var(--rp-accent-line);
    transform: translateY(-2px);
}
.pgl-rp-go:focus-visible {
    outline: 2px solid var(--rp-fg);
    outline-offset: 3px;
}
.pgl-rp-card .pgl-rp-copy {
    height: 46px;
    width: 46px;
    padding: 0;
    border-radius: 999px;
}

/* ---------- Confirmation toast ---------- */
.pgl-rp-toast {
    position: absolute;
    left: 50%;
    bottom: 22px;
    max-width: calc(100% - 32px);
    padding: 11px 18px;
    background: #2a2a2a;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity .25s ease, transform .35s var(--rp-ease);
}
[data-theme='dark'] .pgl-rp-toast {
    background: #f5f5f5;
    color: #2a2a2a;
}
.pgl-rp-toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

@keyframes pglRpRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive (lightbox goes full width at 768px) ---------- */
@media (max-width: 768px) {
    .pgl-report-panel { --rp-top: 78px; }
    .pgl-rp-sheet {
        left: 0;
        width: 100%;
    }
    .pgl-rp-headline { font-size: .9em; }
    .pgl-rp-scroll { padding: 18px 14px 24px; }
    .pgl-rp-content { gap: 18px; }
    .pgl-rp-lead h4 { font-size: 19px; }
    .pgl-rp-lead p { font-size: 14px; }
    .pgl-rp-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .pgl-rp-card { padding: 18px; gap: 16px; }
    .pgl-rp-icon { width: 48px; height: 48px; }
    .pgl-rp-icon svg { width: 25px; height: 25px; }
    .pgl-rp-ref { padding-left: 12px; }
    .pgl-rp-ref .pgl-rp-copy span { display: none; }
    .pgl-rp-ref .pgl-rp-copy { width: 36px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .pgl-report-panel *,
    .pgl-report-panel *::before,
    .pgl-report-panel *::after {
        animation: none !important;
        transition-duration: .01s !important;
    }
}
