/* Styling for Forgot Password link */
.forgot-password {
    text-align: right;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 0.85em;
}

.forgot-password a {
    color: var(--primary-light);
    text-decoration: none;
}

.forgot-password a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* CSS for password reset popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay for better contrast */
    z-index: 9999; /* Ensure it's above everything else */
    display: flex;
    justify-content: center;
    align-items: center;
}

.reset-password-popup,
.success-popup {
    background: white;
    width: 90%;
    max-width: 400px; /* Slightly smaller for a more compact look */
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05); /* Stronger shadow */
    position: fixed;
    top: 30%; /* Position higher on the page */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    overflow: hidden;
}

.popup-header {
    background-color: #1E3A8A;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: opacity 0.2s;
}

.close-popup:hover {
    opacity: 0.7;
}

.popup-body {
    padding: 24px;
}

.popup-body .btn {
    margin-top: 15px;
    transition: background-color 0.2s;
}

.popup-body p {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #333;
}

.popup-timer {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

#popup-countdown {
    font-weight: bold;
    color: #1E3A8A;
}

/* Animation for popup */
.reset-password-popup,
.success-popup {
    animation: popup-appear 0.4s ease-out forwards;
}

@keyframes popup-appear {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Add floating effect to popup */
.reset-password-popup {
    animation: popup-appear 0.4s ease-out forwards, popup-float 3s ease-in-out infinite alternate;
}

@keyframes popup-float {
    from {
        transform: translate(-50%, -50%);
    }
    to {
        transform: translate(-50%, -52%);
    }
}

/* Styling for alert messages in popup */
#reset-error {
    margin-bottom: 15px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsiveness untuk mobile */
@media screen and (max-width: 640px) {
    .reset-password-popup,
    .success-popup {
        width: 95%;
        max-width: none;
    }
}
