/* =========================================================
   MEDIA INFO
   ========================================================= */

#infoPage {
    display: none;

    opacity: 0;

    transform:
        translateY(8px);
}

#infoPage.page-visible {
    display: block;

    animation:
        pageFadeIn
        .28s
        cubic-bezier(.2,.8,.2,1)
        forwards;
}


/* =========================================================
   TITLE / PATH
   ========================================================= */

.info-title {
    margin-bottom: 8px;

    color: var(--text);

    font-size: 24px;
    font-weight: 700;

    line-height: 1.3;

    letter-spacing: -.035em;

    word-break: break-word;
}

.info-path {
    margin-bottom: 28px;

    color: var(--text-muted);

    font-size: 12px;
    line-height: 1.5;

    word-break: break-all;
}


/* =========================================================
   INFO SECTIONS
   ========================================================= */

.info-section {
    position: relative;

    margin-bottom: 16px;

    padding: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.04),
            rgba(255,255,255,.016)
        );

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-md);

    box-shadow:
        var(--shadow-sm);

    overflow: hidden;
}

.info-section::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 0% 0%,
            rgba(139,156,255,.045),
            transparent 40%
        );
}

.info-section h2 {
    position: relative;

    display: flex;

    align-items: center;

    gap: 8px;

    margin:
        0 0 16px;

    color: var(--text);

    font-size: 16px;
    font-weight: 650;

    line-height: 1.3;

    letter-spacing: -.015em;
}


/* =========================================================
   INFO TABLE
   ========================================================= */

.info-table {
    position: relative;

    width: 100%;

    border-collapse: collapse;
}

.info-table td {
    padding:
        10px 5px;

    border-bottom:
        1px solid rgba(255,255,255,.055);

    vertical-align: top;

    color: var(--text-soft);

    font-size: 13px;

    line-height: 1.5;
}

.info-table tr:last-child td {
    border-bottom: 0;
}

.info-table td:first-child {
    width: 220px;

    padding-right: 20px;

    color: var(--text-muted);

    font-size: 12px;

    font-weight: 500;
}

.info-table td:last-child {
    color: var(--text-soft);

    word-break: break-word;
}


/* =========================================================
   STREAMS
   ========================================================= */

.stream {
    position: relative;

    margin-bottom: 12px;

    padding: 15px;

    background:
        rgba(0,0,0,.14);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-sm);

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.stream:last-child {
    margin-bottom: 0;
}

.stream:hover {
    background:
        rgba(255,255,255,.025);

    border-color:
        var(--border-hover);

    transform:
        translateY(-1px);
}

.stream-title {
    margin-bottom: 11px;

    color: var(--text-soft);

    font-size: 13px;
    font-weight: 600;

    line-height: 1.4;
}


/* =========================================================
   MEDIA INFO LOADING
   ========================================================= */

.info-loading {
    display: flex;

    align-items: center;

    gap: 13px;

    padding:
        18px 20px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.04),
            rgba(255,255,255,.018)
        );

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-md);

    color:
        var(--text-muted);

    font-size: 13px;

    box-shadow:
        var(--shadow-sm);

    animation:
        info-loading-enter
        .3s
        cubic-bezier(.22,1,.36,1);
}

@keyframes info-loading-enter {

    from {
        opacity: 0;

        transform:
            translateY(5px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}

.info-loading-text {
    display: flex;

    flex-direction: column;

    gap: 3px;

    min-width: 0;
}

.info-loading-title {
    color:
        var(--text-soft);

    font-weight:
        550;
}

.info-loading-detail {
    color:
        var(--text-muted);

    font-size:
        12px;

    line-height:
        1.4;
}

.info-loading-spinner {
    width: 18px;
    height: 18px;

    flex:
        0 0 18px;

    border:
        2px solid rgba(255,255,255,.09);

    border-top-color:
        var(--accent);

    border-radius:
        50%;

    animation:
        spin
        .8s
        linear
        infinite;
}


/* =========================================================
   SCREENSHOT RESULT
   ========================================================= */

.screenshot-result {
    margin-top: 18px;

    animation:
        screenshot-result-enter
        .35s
        cubic-bezier(.22,1,.36,1);
}

@keyframes screenshot-result-enter {

    from {
        opacity: 0;

        transform:
            translateY(7px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}

.screenshot-result h3 {
    margin:
        0 0 14px;

    color:
        var(--text-soft);

    font-size:
        15px;

    font-weight:
        600;
}

.screenshot-result img {
    display: block;

    width: auto;
    max-width: 100%;
    height: auto;

    margin-top: 10px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-md);

    box-shadow:
        0 20px 55px rgba(0,0,0,.35);
}


/* =========================================================
   SCREENSHOT LOADING
   ========================================================= */

.screenshot-loading {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 15px;

    padding:
        14px 16px;

    background:
        rgba(255,255,255,.035);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-sm);

    color:
        var(--text-muted);

    font-size:
        13px;
}

.screenshot-loading small {
    display: block;

    margin-top: 4px;

    color:
        var(--text-muted);

    font-size:
        11px;

    line-height:
        1.4;
}

.screenshot-spinner {
    width: 18px;
    height: 18px;

    flex:
        0 0 18px;

    border:
        2px solid rgba(255,255,255,.09);

    border-top-color:
        var(--accent);

    border-radius:
        50%;

    animation:
        spin
        .8s
        linear
        infinite;
}


/* =========================================================
   SCREENSHOT ERROR
   ========================================================= */

.screenshot-error {
    margin-top: 15px;

    padding:
        13px 14px;

    background:
        rgba(255,70,70,.055);

    border:
        1px solid rgba(255,100,100,.16);

    border-radius:
        var(--radius-sm);

    color:
        var(--danger);

    font-size:
        13px;
}

.screenshot-error-detail {
    margin-top: 7px;

    color:
        var(--text-muted);

    font-size:
        12px;

    line-height:
        1.45;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .info-title {
        font-size:
            20px;
    }

    .info-path {
        margin-bottom:
            22px;
    }

    .info-section {
        padding:
            16px;
    }

    .info-section h2 {
        font-size:
            15px;
    }

    .info-table td {
        padding:
            9px 4px;

        font-size:
            12px;
    }

    .info-table td:first-child {
        width:
            40%;

        padding-right:
            10px;
    }

    .stream {
        padding:
            13px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .info-loading,
    .screenshot-result {
        animation:
            none;
    }

    .stream {
        transition:
            none;
    }
}