/* ========================================================================
   DIASTOMY DESKTOP HEADER — FIGMA MICRO TUNE R13
   Fine-tunes R12 without touching mobile/tablet behavior.
   ======================================================================== */
@media (min-width: 1200px) {
    body > header.dm-site-header-glass,
    body[data-page="home"] > header.dm-site-header-glass {
        top: 50px !important;
        width: min(1322px, calc(100vw - 102px)) !important;
        max-width: 1322px !important;
        height: 68px !important;
        min-height: 68px !important;
        padding: 0 14px !important;
        border-radius: 999px !important;
        background: rgba(12, 12, 12, .79) !important;
        -webkit-backdrop-filter: blur(10px) saturate(118%) !important;
        backdrop-filter: blur(10px) saturate(118%) !important;
    }

    body > header.dm-site-header-glass > div:nth-of-type(1) {
        gap: 9px !important;
    }

    body > header.dm-site-header-glass img[alt="DIASTOMY"],
    body > header.dm-site-header-glass img[alt="Logo"],
    body > header.dm-site-header-glass > div:nth-of-type(1) > a:first-child img,
    body > header.dm-site-header-glass > div:nth-of-type(1) > a:first-child svg {
        width: 170px !important;
        max-width: 170px !important;
        height: 28px !important;
        max-height: 28px !important;
    }

    body > header.dm-site-header-glass > div:nth-of-type(1) > div.h-8 {
        height: 27px !important;
        margin: 0 5px !important;
        background: rgba(255,255,255,.16) !important;
    }

    body > header.dm-site-header-glass nav {
        gap: 23px !important;
    }

    body > header.dm-site-header-glass nav a {
        min-height: 40px !important;
        font-size: 13px !important;
        font-weight: 350 !important;
    }

    body > header.dm-site-header-glass nav a.relative {
        font-weight: 800 !important;
    }

    body > header.dm-site-header-glass nav a.relative svg {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px !important;
        margin: 0 -7px !important;
    }

    body > header.dm-site-header-glass .dm-site-header-actions {
        gap: 7px !important;
    }

    body > header.dm-site-header-glass .dm-site-search-shell,
    body > header.dm-site-header-glass .dm-site-search-shell > button,
    body > header.dm-site-header-glass .dm-site-mylist,
    body > header.dm-site-header-glass .dm-site-notification {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    body > header.dm-site-header-glass .dm-site-search-shell > button {
        box-shadow: 0 6px 14px rgba(228,26,26,.24) !important;
    }

    body > header.dm-site-header-glass .dm-site-search-shell > button svg {
        width: 19px !important;
        height: 19px !important;
        flex-basis: 19px !important;
    }

    body > header.dm-site-header-glass .dm-site-mylist svg {
        width: 21px !important;
        height: 21px !important;
    }

    body > header.dm-site-header-glass .dm-site-notification svg {
        width: 20px !important;
        height: 20px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile-wrap {
        height: 46px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile-wrap > a.dm-site-profile {
        min-width: 154px !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 3px 9px 3px 3px !important;
        gap: 7px !important;
        border-color: rgba(255,255,255,.18) !important;
    }

    body > header.dm-site-header-glass .dm-site-profile > div:first-child {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile > .flex-col {
        min-width: 64px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile > .flex-col p:first-child {
        margin-bottom: 0 !important;
        font-size: 10.5px !important;
        line-height: 13px !important;
        font-weight: 700 !important;
    }

    body > header.dm-site-header-glass .dm-site-profile > .flex-col p:nth-child(2) {
        font-size: 8.5px !important;
        line-height: 10px !important;
        color: rgba(255,255,255,.43) !important;
    }

    body > header.dm-site-header-glass .dm-site-profile > svg:last-child {
        width: 12px !important;
        min-width: 12px !important;
        height: 12px !important;
        flex-basis: 12px !important;
    }
}

/* Keep compact laptops safe while preserving the same visual language. */
@media (min-width: 1024px) and (max-width: 1199px) {
    body > header.dm-site-header-glass,
    body[data-page="home"] > header.dm-site-header-glass {
        height: 62px !important;
        min-height: 62px !important;
        top: 28px !important;
    }

    body > header.dm-site-header-glass .dm-site-search-shell,
    body > header.dm-site-header-glass .dm-site-search-shell > button,
    body > header.dm-site-header-glass .dm-site-mylist,
    body > header.dm-site-header-glass .dm-site-notification {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile-wrap,
    body > header.dm-site-header-glass .dm-site-profile-wrap > a.dm-site-profile {
        height: 44px !important;
        min-height: 44px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile-wrap > a.dm-site-profile {
        min-width: 148px !important;
    }

    body > header.dm-site-header-glass .dm-site-profile > div:first-child {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        flex-basis: 36px !important;
    }
}


/* DIASTOMY_DESKTOP_PROFILE_DROPDOWN_FIX_V1
   Keep dropdown rows visually independent from the top-level profile trigger.
   Fixes Windows/desktop artifacts behind "لیست فیلم‌های من" and "ورود به پنل کاربری". */
@media (min-width: 1024px) {
    body > header.dm-site-header-glass
    .dm-site-profile-wrap > div.absolute
    .dm-profile-menu-row {
        position: relative !important;
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 46px !important;
        padding: 10px 12px !important;
        margin: 0 !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        border: 0 !important;
        border-radius: 12px !important;
        background: transparent !important;
        box-shadow: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        transform: none !important;
        overflow: visible !important;
    }

    body > header.dm-site-header-glass
    .dm-site-profile-wrap > div.absolute
    .dm-profile-menu-row:hover {
        background: rgba(255,255,255,.055) !important;
    }

    /* Reset the content wrapper: it must never inherit the profile/avatar pill. */
    body > header.dm-site-header-glass
    .dm-site-profile-wrap > div.absolute
    .dm-profile-menu-row > div:first-child {
        display: flex !important;
        width: auto !important;
        min-width: 0 !important;
        height: auto !important;
        flex: 1 1 auto !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    body > header.dm-site-header-glass
    .dm-site-profile-wrap > div.absolute
    .dm-profile-menu-row > div:first-child > svg {
        display: block !important;
        width: 18px !important;
        min-width: 18px !important;
        height: 18px !important;
        flex: 0 0 18px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
    }

    body > header.dm-site-header-glass
    .dm-site-profile-wrap > div.absolute
    .dm-profile-menu-row > div:first-child > p {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #fff !important;
        font-size: 12px !important;
        line-height: 18px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    /* The row chevron should be a plain icon, never a floating bubble. */
    body > header.dm-site-header-glass
    .dm-site-profile-wrap > div.absolute
    .dm-profile-menu-row > svg:last-child {
        display: block !important;
        width: 15px !important;
        min-width: 15px !important;
        height: 15px !important;
        flex: 0 0 15px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: rgba(255,255,255,.78) !important;
        transform: none !important;
    }
}
/* END DIASTOMY_DESKTOP_PROFILE_DROPDOWN_FIX_V1 */
