/*
4330	NEW CUCO — Modal CSS Fix
admin2	Site Wide Header	30 September 2025 at 18:29		css	10
*/

/* ========================================
   CUCO Auth Modal - Înălțime FIXĂ (fără resize la tab switch)
   Snippet ID: 4330 (NEW CUCO — Modal CSS Fix)

   Ambele paneluri (Login și Register) au ACEEAȘI înălțime
   pentru a preveni "jump-ul" vizual când comiți între taburi
   ======================================== */
/* OVERRIDE opacity 0 din alte CSS-uri */
#cucoAuthModal {
    opacity: 1 !important;
}

#cucoAuthModal[aria-hidden="false"],
#cucoAuthModal[style*="flex"] {
    opacity: 1 !important;
    pointer-events: auto !important;
}

#cucoAuthModal[aria-hidden="true"],
#cucoAuthModal[style*="none"] {
    opacity: 0 !important;
    pointer-events: none !important;
}
/* === Modal Container === */
#cucoAuthModal {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,.75) !important;
    z-index: 999999 !important;
    display: none;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 10vh !important;
    overflow-y: auto !important;
}

/* === Card === */
.cuco-modal__card {
    position: relative !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    padding: 52px 32px 32px 32px !important;
    background: #0F1422 !important;
    border-radius: 16px !important;
    border: 1px solid #23283B !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.5) !important;
}

/* === Close Button === */
.cuco-modal__close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    background: transparent !important;
    border: 2px solid #D4AF37 !important;
    border-radius: 6px !important;
    color: #D4AF37 !important;
    font-size: 24px !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    line-height: 1 !important;
    z-index: 10 !important;
    padding: 0 !important;
    transition: all .2s ease !important;
}
.cuco-modal__close:hover {
    background: rgba(212,175,55,.15) !important;
    border-color: #F6D773 !important;
    color: #F6D773 !important;
}

/* === Tabs === */
.cuco-tabs {
    display: flex !important;
    gap: 12px !important;
    margin: 8px 0 24px !important;
}
.cuco-tab {
    flex: 1 !important;
    padding: 12px !important;
    background: #1A1F2E !important;
    border: 1px solid #23283B !important;
    border-radius: 8px !important;
    color: #E9ECF4 !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    font-weight: 600 !important;
}
.cuco-tab:hover {
    background: #232939 !important;
}
.cuco-tab.is-active {
    background: #D4AF37 !important;
    color: #111 !important;
    border-color: #D4AF37 !important;
}

/* ========================================
   ✅ FIX ÎNĂLȚIME: Ambele paneluri au MIN-HEIGHT identic
   ======================================== */

/* Container pentru paneluri - FIXEAZĂ înălțimea */
.cuco-panels {
    position: relative !important;
    min-height: 400px !important; /* Înălțimea panelului Login (cel mai lung) */
}

/* Panelurile individuale */
.cuco-panel {
    display: none !important;
    color: #E9ECF4 !important;
    padding: 8px 0 !important;

    /* ✅ CRITICAL: Înălțime fixă pentru a preveni resize */
    min-height: 400px !important; /* Aceeași ca .cuco-panels */

    /* Layout intern */
    display: none;
    flex-direction: column !important;
    gap: 16px !important;
}

.cuco-panel.is-active {
    display: flex !important; /* Afișează ca flexbox când e activ */
}

/* === Form Elements === */
.cuco-panel label {
    display: block !important;
    margin: 0 !important;
    color: #E9ECF4 !important;
    font-weight: 600 !important;
}

.cuco-panel label span {
    display: block !important;
    margin-bottom: 6px !important;
}

.cuco-panel input[type="text"],
.cuco-panel input[type="email"],
.cuco-panel input[type="password"] {
    width: 100% !important;
    padding: 12px !important;
    background: #1A1F2E !important;
    border: 1px solid #23283B !important;
    border-radius: 8px !important;
    color: #E9ECF4 !important;
    font-size: 15px !important;
    transition: border-color .2s ease !important;
}

.cuco-panel input:focus {
    outline: none !important;
    border-color: #D4AF37 !important;
}

/* === Checkbox === */
.cuco-check {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    font-weight: normal !important;
}

.cuco-check input[type="checkbox"] {
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: #D4AF37 !important;
    cursor: pointer !important;
}

/* === Help Text (Register panel) === */
.cuco-help {
    font-size: 13px !important;
    color: #A8B0C2 !important;
    line-height: 1.5 !important;
    margin: 12px 0 !important;
}

/* === Submit Button === */
.cuco-panel button[type="submit"] {
    width: 100% !important;
    padding: 14px 20px !important;
    background: #D4AF37 !important;
    color: #111 !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    margin-top: auto !important; /* Push la final */
}

.cuco-panel button[type="submit"]:hover {
    background: #F6D773 !important;
    transform: translateY(-1px) !important;
}

.cuco-panel button[type="submit"]:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* === Messages === */
.cuco-msg {
    padding: 12px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    min-height: 44px !important; /* Rezervă spațiu pentru mesaj */
    display: flex !important;
    align-items: center !important;
}

.cuco-msg:empty {
    display: none !important;
}

.cuco-msg.error {
    background: rgba(255,107,107,.1) !important;
    border: 1px solid rgba(255,107,107,.3) !important;
    color: #ff6b6b !important;
}

.cuco-msg.success {
    background: rgba(212,175,55,.1) !important;
    border: 1px solid rgba(212,175,55,.3) !important;
    color: #D4AF37 !important;
}

/* === Links === */
.cuco-link {
    display: inline-block !important;
    color: #D4AF37 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: color .2s ease !important;
}

.cuco-link:hover {
    color: #F6D773 !important;
    text-decoration: underline !important;
}

/* === Responsive === */
@media (max-width: 767px) {
    #cucoAuthModal {
        padding-top: 5vh !important;
    }

    .cuco-modal__card {
        max-width: 95% !important;
        padding: 44px 20px 20px 20px !important;
    }

    /* Ajustează înălțimea pe mobile */
    .cuco-panels,
    .cuco-panel {
        min-height: 380px !important;
    }
}
/* Transfer Bilete Popup - Overlay + Modal (ENHANCED UX - FIXED CENTERING) */
#transfer-popup-overlay {
    display: none; /* ascuns implicit */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 999998 !important;
    cursor: pointer !important;
    animation: fadeIn 0.2s ease !important;
}

#transfer-popup {
    display: none; /* ascuns implicit */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: linear-gradient(135deg, #0F1422 0%, #1a1f2e 100%) !important;
    border: 2px solid #D6B46C !important;
    border-radius: 20px !important;
    padding: 60px 80px !important;
    z-index: 999999 !important;
    color: #E9ECF4 !important;
    font-size: 32px !important;
    font-weight: 700 !important;
    text-align: center !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(214, 180, 108, 0.3) !important;
    animation: slideUp 0.3s ease !important;
    min-width: 400px !important;
    max-width: 90vw !important;
    cursor: default !important;
}

/* Previne click-through pe popup */
#transfer-popup * {
    pointer-events: auto !important;
}

/* Animații */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Emoji în popup mai mare */
#transfer-popup::before {
    content: '🎟️';
    display: block;
    font-size: 56px;
    margin-bottom: 20px;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Styling pentru butonul X (se adaugă dinamic din JS) */
#transfer-popup .close-btn {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #E9ECF4 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 28px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    font-weight: 300 !important;
    z-index: 1000000 !important;
}

#transfer-popup .close-btn:hover {
    background: rgba(214, 180, 108, 0.2) !important;
    transform: rotate(90deg) !important;
    border-color: #D6B46C !important;
}

/* Responsive pentru mobile */
@media (max-width: 768px) {
    #transfer-popup {
        padding: 50px 30px !important;
        font-size: 24px !important;
        border-radius: 16px !important;
        min-width: 300px !important;
    }

    #transfer-popup::before {
        font-size: 42px;
        margin-bottom: 16px;
    }

    #transfer-popup .close-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 24px !important;
        top: 16px !important;
        right: 16px !important;
    }
}

/* Asigură că overlay-ul acoperă tot */
body.transfer-popup-open {
    overflow: hidden !important;
}
/* === FIX MOBIL: Aerisire conținut modal === */
@media (max-width: 768px) {
    .cuco-modal__card {
        padding: 58px 28px 28px 28px !important;
    }

    .cuco-tabs {
        margin: 12px 0 20px !important;
    }

    .cuco-panels {
        margin-top: 4px !important;
    }
}