/* ============================================================
   YOUTUBE SHORT MODAL
============================================================ */

.youtube-short-modal {
    display: none;

    position: fixed;
    inset: 0;

    z-index: 9999;

    background: rgba(0, 0, 0, 0.75);

    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;
}


/* ============================================================
   DIALOG
============================================================ */

.youtube-short-dialog {
    position: relative;

    width: min(420px, 95vw);

    background: #111;

    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.45);
}


/* ============================================================
   HEADER
============================================================ */

.youtube-short-header {
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 14px 0 18px;

    background: #181818;

    color: white;

    box-sizing: border-box;
}


.youtube-short-title {
    font-size: 17px;
    font-weight: 600;
}


.youtube-short-close {
    border: none;

    background: transparent;

    color: white;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    padding: 0 4px;
}


.youtube-short-close:hover {
    opacity: 0.75;
}


/* ============================================================
   VIDEO
============================================================ */

.youtube-short-video-container {
    width: 100%;

    aspect-ratio: 9 / 16;

    background: #000;

    position: relative;
}


.youtube-short-player {
    width: 100%;
    height: 100%;
    
    position: relative;
    overflow: hidden; /* Clips the pushed top portion of the video */
}


.youtube-short-player iframe {
    position: absolute;
    top: -65px; /* Shifts the iframe up to hide the top title overlay */
    left: 0;

    width: 100%;
    height: calc(100% + 65px); /* Extends height so the bottom is not pulled up */

    border: 0;
}


/* ============================================================
   INVALID URL MESSAGE
============================================================ */

.youtube-short-message {
    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    box-sizing: border-box;

    text-align: center;

    color: white;

    font-size: 17px;

    background: #181818;
}

/* ============================================================
   VIDEO (REVERTED TO UNCROPPED NORMAL DISPLAY)
============================================================ */

.youtube-short-video-container {
    width: 100%;

    aspect-ratio: 9 / 16;

    background: #000;

    position: relative;
}


.youtube-short-player {
    width: 100%;
    height: 100%;
    position: relative;
}


.youtube-short-player iframe {
    position: absolute;
    top: 0; /* Reverted: standard top alignment */
    left: 0;

    width: 100%;
    height: 100%; /* Reverted: standard 100% height */

    border: 0;
}


/* ============================================================
   CLEAN MODAL FOOTER
============================================================ */

.youtube-short-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    padding: 12px 16px;
    background: #181818;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.subscribe-prompt {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.custom-subscribe-btn {
    background-color: #ff0000;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-subscribe-btn:hover {
    background-color: #cc0000;
}

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

@media (max-width: 600px) {

    .youtube-short-modal {
        padding: 10px;
    }

    .youtube-short-dialog {
        width: min(420px, 96vw);
    }
}