/* ==========================================================================
   RINALDO WIN - BIRTHDAY CALENDAR
   Premium glass birthday date picker
   ========================================================================== */


/* ==========================================================================
   MODAL
   ========================================================================== */

.birthday-modal {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.birthday-modal.is-open {
    visibility: visible;
    opacity: 1;

    pointer-events: auto;
}


/* ==========================================================================
   OVERLAY
   ========================================================================== */

.birthday-modal-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, .72);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    cursor: pointer;
}


/* ==========================================================================
   MODAL CARD
   ========================================================================== */

.birthday-modal-card {
    position: relative;

    z-index: 2;

    width: min(560px, calc(100vw - 30px));

    padding:
        32px
        30px
        28px;

    overflow: hidden;

    border:
        1px solid
        rgba(235, 241, 255, .38);

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(25, 30, 45, .96),
            rgba(7, 11, 21, .98)
        );

    box-shadow:
        0 35px 100px rgba(0,0,0,.65),
        0 0 55px rgba(255,190,50,.08),
        inset 0 1px 0 rgba(255,255,255,.12);

    transform:
        translateY(20px)
        scale(.97);

    opacity: 0;

    transition:
        transform .28s ease,
        opacity .28s ease;
}

.birthday-modal.is-open .birthday-modal-card {
    transform:
        translateY(0)
        scale(1);

    opacity: 1;
}

.birthday-modal-card::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    border-radius: inherit;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255,201,75,.10),
            transparent 42%
        );
}

.birthday-modal-card::after {
    content: "";

    position: absolute;

    left: 10%;
    right: 10%;
    top: 0;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,216,112,.65),
            transparent
        );

    pointer-events: none;
}


/* ==========================================================================
   CLOSE
   ========================================================================== */

.birthday-modal-close {
    position: absolute;

    top: 15px;
    right: 17px;

    z-index: 5;

    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    padding: 0;

    border:
        1px solid
        rgba(255,255,255,.18);

    border-radius: 50%;

    background:
        rgba(255,255,255,.045);

    color:
        rgba(255,255,255,.82);

    font-size: 27px;
    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.birthday-modal-close:hover {
    color: var(--gold-light);

    border-color:
        rgba(255,201,75,.55);

    background:
        rgba(255,201,75,.08);

    transform: rotate(90deg);
}


/* ==========================================================================
   TITLE
   ========================================================================== */

.birthday-modal-card h2 {
    position: relative;
    z-index: 2;

    margin:
        0
        45px
        25px;

    padding-right: 35px;

    color:
        var(--white);

    text-align: center;

    font-size: 24px;

    line-height: 1.2;

    font-weight: 700;

    letter-spacing: -.4px;
}

.birthday-modal-card h2::after {
    content: "";

    display: block;

    width: 70px;
    height: 2px;

    margin:
        12px
        auto
        0;

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold),
            transparent
        );

    box-shadow:
        0 0 12px rgba(255,201,75,.35);
}


/* ==========================================================================
   WHEEL CONTAINER
   ========================================================================== */

.birthday-wheel {
    position: relative;
    z-index: 2;

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;

    height: 290px;

    padding:
        0
        2px;

    overflow: hidden;
}


/* ==========================================================================
   WHEEL COLUMN
   ========================================================================== */

.wheel-column {
    position: relative;

    min-width: 0;

    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.13);

    border-radius: 18px;

    background:
        rgba(255,255,255,.025);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05);
}


/* ==========================================================================
   WHEEL TITLE
   ========================================================================== */

.wheel-title {
    position: relative;

    z-index: 5;

    flex: 0 0 39px;

    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-bottom:
        1px solid
        rgba(255,255,255,.10);

    background:
        rgba(4,7,14,.42);

    color:
        rgba(255,215,122,.78);

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.8px;
}


/* ==========================================================================
   WHEEL LIST
   ========================================================================== */

.wheel-list {
    position: relative;

    flex: 1;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    scroll-behavior: smooth;

    overscroll-behavior: contain;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;

    touch-action: pan-y;

    padding:
        106px
        0;
}

.wheel-list::-webkit-scrollbar {
    display: none;
}


/* ==========================================================================
   WHEEL ITEMS
   ========================================================================== */

.wheel-item {
    width: 100%;

    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border: 0;

    background: transparent;

    color:
        rgba(235,239,248,.38);

    font-size: 16px;

    font-weight: 500;

    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    user-select: none;

    -webkit-user-select: none;

    transition:
        color .18s ease,
        opacity .18s ease,
        transform .18s ease;
}

.wheel-item:hover {
    color:
        rgba(255,255,255,.76);
}

.wheel-item.is-selected,
.wheel-item.selected,
.wheel-item.active {
    color:
        var(--gold);

    font-weight: 700;

    text-shadow:
        0 0 14px rgba(255,201,75,.35);

    transform: scale(1.03);
}


/* ==========================================================================
   CENTRAL SELECTION
   ========================================================================== */

.wheel-selection {
    position: absolute;

    z-index: 10;

    left: 2px;
    right: 2px;

    top: 50%;

    height: 44px;

    transform:
        translateY(-50%);

    pointer-events: none;

    border-top:
        1px solid
        rgba(255,201,75,.48);

    border-bottom:
        1px solid
        rgba(255,201,75,.48);

    background:
        linear-gradient(
            90deg,
            rgba(255,201,75,.035),
            rgba(255,201,75,.09),
            rgba(255,201,75,.035)
        );

    box-shadow:
        0 0 20px rgba(255,201,75,.055),
        inset 0 0 15px rgba(255,201,75,.035);
}


/* ==========================================================================
   WHEEL FADE - TOP / BOTTOM
   ========================================================================== */

.wheel-column::before,
.wheel-column::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    z-index: 8;

    height: 72px;

    pointer-events: none;
}

.wheel-column::before {
    top: 39px;

    background:
        linear-gradient(
            180deg,
            rgba(7,11,21,.98),
            rgba(7,11,21,.68),
            transparent
        );
}

.wheel-column::after {
    bottom: 0;

    background:
        linear-gradient(
            0deg,
            rgba(7,11,21,.98),
            rgba(7,11,21,.68),
            transparent
        );
}


/* ==========================================================================
   SELECTED PREVIEW
   ========================================================================== */

.birthday-selected-preview {
    position: relative;
    z-index: 2;

    min-height: 23px;

    margin:
        17px
        0
        15px;

    color:
        rgba(255,255,255,.68);

    text-align: center;

    font-size: 13px;

    letter-spacing: .25px;
}

.birthday-selected-preview strong {
    color:
        var(--gold-light);
}


/* ==========================================================================
   CONFIRM BUTTON
   ========================================================================== */

.birthday-confirm {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 58px;

    border:
        1px solid
        rgba(255,220,128,.78);

    border-radius: 30px;

    background:
        linear-gradient(
            105deg,
            rgba(35,27,10,.96),
            rgba(112,77,13,.94) 55%,
            rgba(255,195,46,.96)
        );

    color: #fff;

    font-size: 15px;

    font-weight: 700;

    letter-spacing: .15px;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(255,178,30,.17),
        inset 0 1px 0 rgba(255,255,255,.16);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.birthday-confirm:hover {
    transform: translateY(-2px);

    border-color:
        rgba(255,225,145,.95);

    box-shadow:
        0 14px 35px rgba(255,178,30,.28),
        0 0 25px rgba(255,200,60,.12),
        inset 0 1px 0 rgba(255,255,255,.18);
}

.birthday-confirm:active {
    transform: translateY(0);
}

.birthday-confirm:disabled {
    opacity: .45;

    cursor: not-allowed;

    transform: none;

    box-shadow:
        none;
}


/* ==========================================================================
   FOCUS
   ========================================================================== */

.birthday-modal-close:focus-visible,
.birthday-confirm:focus-visible,
.wheel-item:focus-visible,
.wheel-list:focus-visible {
    outline:
        2px solid
        rgba(255,201,75,.82);

    outline-offset: 2px;
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media screen and (max-width: 760px) {

    .birthday-modal {
        align-items: center;

        padding:
            15px;

        overflow: hidden;

        overscroll-behavior: contain;
    }


    /* CARD */

    .birthday-modal-card {
        width:
            min(
                100%,
                430px
            );

        max-height:
            calc(100svh - 30px);

        padding:
            25px
            17px
            20px;

        border-radius: 25px;

        overflow: hidden;

        transform:
            translateY(18px)
            scale(.97);
    }

    .birthday-modal.is-open .birthday-modal-card {
        transform:
            translateY(0)
            scale(1);
    }


    /* CLOSE */

    .birthday-modal-close {
        top: 11px;
        right: 11px;

        width: 38px;
        height: 38px;

        font-size: 24px;
    }


    /* TITLE */

    .birthday-modal-card h2 {
        margin:
            4px
            38px
            20px;

        padding-right: 25px;

        font-size: 20px;
    }

    .birthday-modal-card h2::after {
        width: 55px;

        margin-top: 9px;
    }


    /* WHEEL */

    .birthday-wheel {
        height:
            min(
                265px,
                48svh
            );

        gap: 8px;
    }

    .wheel-column {
        border-radius: 14px;
    }

    .wheel-title {
        flex-basis: 35px;

        height: 35px;

        font-size: 9px;

        letter-spacing: 1.4px;
    }

    .wheel-list {
        padding:
            101px
            0;
    }

    .wheel-item {
        height: 40px;

        font-size: 15px;
    }

    .wheel-selection {
        left: 1px;
        right: 1px;

        height: 42px;
    }

    .wheel-column::before {
        top: 35px;
    }


    /* PREVIEW */

    .birthday-selected-preview {
        margin:
            13px
            0
            12px;

        font-size: 12px;
    }


    /* CONFIRM */

    .birthday-confirm {
        height: 54px;

        border-radius: 28px;

        font-size: 14px;
    }
}


/* ==========================================================================
   VERY SMALL PHONES
   ========================================================================== */

@media screen and (max-width: 380px) {

    .birthday-modal {
        padding:
            10px;
    }

    .birthday-modal-card {
        padding:
            22px
            12px
            16px;

        border-radius: 22px;
    }

    .birthday-modal-card h2 {
        margin:
            2px
            35px
            16px;

        font-size: 18px;
    }

    .birthday-wheel {
        gap: 5px;

        height: 245px;
    }

    .wheel-item {
        font-size: 14px;
    }

    .birthday-confirm {
        height: 51px;
    }
}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .birthday-modal,
    .birthday-modal-card,
    .birthday-modal-close,
    .birthday-confirm,
    .wheel-item {
        transition: none !important;
    }

    .wheel-list {
        scroll-behavior: auto !important;
    }
}
/* ==========================================================
   BIRTHDAY CALENDAR - FIX MODAL / Z-INDEX
   ========================================================== */

.birthday-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    z-index: 1000000 !important;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity .2s ease,
        visibility .2s ease;
}

/* toate variantele uzuale pe care le poate folosi JS-ul */
.birthday-modal.open,
.birthday-modal.active,
.birthday-modal.show,
.birthday-modal.is-open,
.birthday-modal[data-open="true"] {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}


/* FUNDAL */
.birthday-modal-overlay {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background: rgba(0, 0, 0, .72) !important;

    z-index: 1 !important;
}


/* CARDUL CALENDARULUI */
.birthday-modal-card {
    position: relative !important;

    z-index: 2 !important;

    width: min(92vw, 520px) !important;
    max-height: 90vh !important;

    overflow: hidden !important;

    margin: auto !important;

    padding: 30px !important;

    border-radius: 24px !important;

    background:
        linear-gradient(
            145deg,
            rgba(25, 29, 42, .98),
            rgba(8, 11, 18, .98)
        ) !important;

    border: 1px solid rgba(255, 201, 75, .45) !important;

    box-shadow:
        0 30px 90px rgba(0, 0, 0, .75),
        0 0 40px rgba(255, 201, 75, .12) !important;

    color: #fff !important;

    transform: translateY(0) scale(1) !important;
}


/* BUTON ÎNCHIDERE */
.birthday-modal-close {
    position: absolute !important;

    top: 14px !important;
    right: 16px !important;

    z-index: 10 !important;

    width: 38px !important;
    height: 38px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 1px solid rgba(255,255,255,.2) !important;
    border-radius: 50% !important;

    background: rgba(255,255,255,.06) !important;

    color: #fff !important;

    font-size: 25px !important;
    line-height: 1 !important;

    cursor: pointer !important;

    pointer-events: auto !important;
}


/* TITLU */
.birthday-modal-card h2 {
    position: relative !important;
    z-index: 3 !important;

    margin: 0 45px 25px 0 !important;

    color: #fff !important;

    font-size: 25px !important;
    font-weight: 700 !important;
}


/* ZONA CALENDAR */
.birthday-wheel {
    position: relative !important;
    z-index: 3 !important;

    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;

    gap: 10px !important;

    width: 100% !important;
}


/* COLOANE */
.wheel-column {
    position: relative !important;
    z-index: 4 !important;

    min-width: 0 !important;
}


/* TITLU ZI/LUNA/AN */
.wheel-title {
    margin-bottom: 8px !important;

    text-align: center !important;

    color: rgba(255,255,255,.65) !important;

    font-size: 11px !important;
    font-weight: 700 !important;

    letter-spacing: 1.5px !important;
}


/* LISTELE */
.wheel-list {
    position: relative !important;
    z-index: 5 !important;
    scroll-behavior: auto;
    overscroll-behavior: contain;
    height: 190px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    touch-action: pan-y;

    border-radius: 16px !important;

    border: 1px solid rgba(255,255,255,.12) !important;

    background: rgba(255,255,255,.035) !important;

    scrollbar-width: none !important;
    padding:
        106px
        0;
}

.wheel-list::-webkit-scrollbar {
    display: none !important;
}


/* ELEMENTELE DIN LISTĂ */
.wheel-list > * {
    position: relative !important;
    z-index: 6 !important;

    min-height: 46px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: rgba(255,255,255,.7) !important;

    cursor: pointer !important;

    user-select: none !important;
    -webkit-user-select: none !important;

    touch-action: manipulation !important;
}


/* SELECȚIA */
.wheel-selection {
    position: absolute !important;

    left: 0 !important;
    right: 0 !important;

    top: 50% !important;

    height: 46px !important;

    transform: translateY(-50%) !important;

    pointer-events: none !important;

    border-top: 1px solid rgba(255,201,75,.55) !important;
    border-bottom: 1px solid rgba(255,201,75,.55) !important;

    background: rgba(255,201,75,.05) !important;

    z-index: 20 !important;
}


/* PREVIEW */
.birthday-selected-preview {
    position: relative !important;
    z-index: 3 !important;

    margin-top: 22px !important;
    padding: 13px 15px !important;

    text-align: center !important;

    border-radius: 12px !important;

    background: rgba(255,255,255,.05) !important;
    border: 1px solid rgba(255,255,255,.1) !important;

    color: #ffc94b !important;

    font-weight: 600 !important;
}


/* CONFIRMĂ */
.birthday-confirm {
    position: relative !important;
    z-index: 5 !important;

    width: 100% !important;

    margin-top: 18px !important;
    padding: 14px 20px !important;

    border: 0 !important;
    border-radius: 13px !important;

    background: linear-gradient(
        135deg,
        #d99217,
        #ffc94b
    ) !important;

    color: #111 !important;

    font-size: 15px !important;
    font-weight: 700 !important;

    cursor: pointer !important;
    touch-action: manipulation !important;
}


/* MOBIL */
@media (max-width: 600px) {

    .birthday-modal {
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    .birthday-modal-card {
        width: 100% !important;
        max-width: 420px !important;

        padding: 24px 18px !important;

        border-radius: 20px !important;
    }

    .birthday-modal-card h2 {
        font-size: 21px !important;
    }

    .wheel-list {
        height: 180px !important;
    }
}
/* ==========================================================
   FINAL FIX - BIRTHDAY MODAL CARD VISIBILITY
   ========================================================== */

/* Când modalul este deschis prin ORICARE dintre clasele folosite */
.birthday-modal.open .birthday-modal-card,
.birthday-modal.active .birthday-modal-card,
.birthday-modal.show .birthday-modal-card,
.birthday-modal.is-open .birthday-modal-card,
.birthday-modal[data-open="true"] .birthday-modal-card {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;

    transform:
        translateY(0)
        scale(1) !important;
}

/* Când modalul este închis */
.birthday-modal:not(.open):not(.active):not(.show):not(.is-open):not([data-open="true"])
.birthday-modal-card {
    opacity: 0;
    pointer-events: none;
}