/*
6872	NEW: CSS Modal reset password - îl mutăm după teste
admin2	Site Wide Header	19 October 2025 at 13:24		css	10
*/

/* ===== RESET PASSWORD MODAL BASE - CENTRAT PERFECT ===== */
#cucoResetModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,.75) !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important;
    padding: 20px !important;
    pointer-events: auto !important;
}

#cucoResetModal[aria-hidden="false"] {
    display: flex !important;
}

/* ✅ Overlay full screen - NU BLOCHEAZĂ click-urile */
#cucoResetModal .cuco-modal__overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,.75) !important;
    backdrop-filter: blur(2px) !important;
    z-index: 1 !important;
    pointer-events: auto !important;
}

/* ✅ Card centrat perfect - folosim flexbox din părinte */
#cucoResetModal .cuco-modal__card {
    position: relative !important;
    background: #0F1422 !important;
    border: 1px solid #23283B !important;
    border-radius: 16px !important;
    padding: 52px 32px 32px 32px !important;
    z-index: 10 !important;
    margin: 0 !important;
    max-width: 460px !important;
    width: 100% !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
}

/* ===== FORGOT & RESET PASSWORD MODALS ===== */

/* Modal card mai mic pentru forgot password */
.cuco-modal__card--sm {
    max-width: 460px !important;
}

/* Header modal */
.cuco-modal__header {
    text-align: center;
    margin-bottom: 24px;
}

.cuco-modal__header h2 {
    margin: 0 0 8px;
    color: #E9ECF4;
    font-size: 22px;
    font-weight: 900;
}

.cuco-modal__lead {
    margin: 0;
    color: #A8B0C2;
    font-size: 14px;
    line-height: 1.5;
}

/* Form footer (link înapoi) */
.cuco-form__footer {
    margin-top: 16px;
    text-align: center;
}

.cuco-form__footer .cuco-link {
    color: #A8B0C2;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.cuco-form__footer .cuco-link:hover {
    color: #D6B46C;
}

/* Password wrapper cu eye icon */
.cuco-pass-wrap {
    position: relative;
}

.cuco-pass-wrap input {
    padding-right: 44px !important;
}

.cuco-pass-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #2a3353;
    background: #161c2f;
    color: #E9EDF3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2 !important;
    pointer-events: auto !important;
}

.cuco-pass-eye:hover {
    background: #1f2741;
}

.cuco-pass-eye.is-on {
    background: #1f2741;
}

.cuco-pass-eye svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    stroke: currentColor !important;
}

/* Buton primary */
.cuco-btn--primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(180deg, #FF6B3D 0%, #FF7A50 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 16px rgba(255, 107, 61, 0.22);
    pointer-events: auto !important;
}

.cuco-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 107, 61, 0.28);
}

.cuco-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== RESET MODAL GOLD STYLING ===== */
#cucoResetModal .cuco-modal__close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    background: transparent !important;
    border: 2px solid #D6B46C !important;
    border-radius: 6px !important;
    color: #D6B46C !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: 20 !important;
    padding: 0 !important;
    transition: all .2s ease !important;
    pointer-events: auto !important;
}

#cucoResetModal .cuco-modal__close:hover {
    background: rgba(214, 180, 108, .15) !important;
    border-color: #F6D773 !important;
    color: #F6D773 !important;
}

#cucoResetModal label {
    display: block !important;
    margin-bottom: 16px !important;
    color: #E9ECF4 !important;
    font-weight: 600 !important;
}

#cucoResetModal label span {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
}

#cucoResetModal input[type="password"] {
    width: 100% !important;
    padding: 12px 44px 12px 16px !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;
    pointer-events: auto !important;
}

#cucoResetModal input[type="password"]:focus {
    outline: none !important;
    border-color: #D6B46C !important;
}

#cucoResetModal .cuco-btn--primary {
    width: 100% !important;
    padding: 14px 20px !important;
    background: linear-gradient(135deg, #D6B46C 0%, #F6D773 100%) !important;
    color: #111 !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all .2s ease !important;
    margin-top: 8px !important;
    box-shadow: 0 6px 16px rgba(214, 180, 108, 0.3) !important;
    pointer-events: auto !important;
}

#cucoResetModal .cuco-btn--primary:hover {
    background: linear-gradient(135deg, #F6D773 0%, #FFE799 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(214, 180, 108, 0.4) !important;
}

#cucoResetModal .cuco-btn--primary:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

#cucoResetModal .cuco-msg {
    padding: 12px !important;
    margin-top: 12px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    text-align: center !important;
}

#cucoResetModal .cuco-msg.error {
    background: rgba(255, 107, 107, .1) !important;
    border: 1px solid rgba(255, 107, 107, .3) !important;
    color: #ff6b6b !important;
}

#cucoResetModal .cuco-msg.success {
    background: rgba(214, 180, 108, .1) !important;
    border: 1px solid rgba(214, 180, 108, .3) !important;
    color: #D6B46C !important;
}

#cucoResetModal .cuco-msg.success::after {
    content: ' În câteva momente vei fi redirecționat la Panoul de control...';
    display: block;
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.9;
}

/* Password eye button gold */
#cucoResetModal .cuco-pass-eye {
    border-color: #D6B46C !important;
    background: rgba(214, 180, 108, .1) !important;
    color: #D6B46C !important;
}

#cucoResetModal .cuco-pass-eye:hover,
#cucoResetModal .cuco-pass-eye.is-on {
    background: rgba(214, 180, 108, .2) !important;
    border-color: #F6D773 !important;
}

/* ===== FIX FORGOT PASSWORD MODAL SPACING ===== */
#cucoForgotPanel {
    padding: 24px 0 !important;
}

#cucoForgotPanel h3 {
    margin: 0 0 12px !important;
}

#cucoForgotPanel p:not(.cuco-msg) {
    margin: 0 0 24px !important;
}

#cucoForgotPanel label {
    display: block;
    margin-bottom: 20px !important;
}

#cucoForgotPanel label span {
    display: block;
    margin-bottom: 8px;
}

#cucoForgotPanel button[type="submit"] {
    margin-top: 8px;
}

#cucoForgotPanel .cuco-link {
    margin-top: 16px !important;
}

/* ===== FORGOT PANEL HIDING FIX ===== */
#cucoForgotPanel {
    display: none !important;
}

#cucoForgotPanel.is-active {
    display: flex !important;
    flex-direction: column !important;
}

#cucoForgotPanel .cuco-msg {
    margin-top: 16px !important;
}

#cucoForgotPanel button[type="submit"] {
    margin-top: 16px !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
    #cucoResetModal {
        padding: 16px !important;
    }

    #cucoResetModal .cuco-modal__card {
        padding: 40px 20px 24px 20px !important;
    }

    .cuco-modal__header h2 {
        font-size: 20px;
    }
}