/* Professional Authentication Form Styles */

/* Loading animation for buttons */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

/* Form input focus effects */
.auth-input {
    position: relative;
    transition: all 0.3s ease;
}

.auth-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Floating label animation */
.floating-label {
    position: relative;
}

.floating-label input:not(:placeholder-shown) + label,
.floating-label input:focus + label {
    transform: translateY(-25px) scale(0.85);
    color: #667eea;
}

.floating-label label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    color: #9ca3af;
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: linear-gradient(to right, #ef4444 33%, #e5e7eb 33%);
}

.password-strength.medium {
    background: linear-gradient(to right, #f59e0b 66%, #e5e7eb 66%);
}

.password-strength.strong {
    background: #10b981;
}

/* Checkbox custom styling */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Social login buttons */
.social-login-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.social-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.social-login-btn:hover::before {
    left: 100%;
}

/* Auth card animation on load */
.auth-card {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input error shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.input-error {
    animation: shake 0.5s ease-in-out;
}

/* Success checkmark animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4caf50;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }
    5% {
        transform: rotate(-45deg);
    }
    12% {
        transform: rotate(-405deg);
    }
    100% {
        transform: rotate(-405deg);
    }
}

/* Professional tooltip */
.auth-tooltip {
    position: relative;
    display: inline-block;
}

.auth-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.auth-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Responsive improvements */
@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 0;
        border-radius: 0.5rem;
    }
}
/* ---------------------------------------------------------------------------
   Auth pages on short screens (e.g. 1366x768 laptops): the theme gives the page a fixed
   100% height and centres it vertically. When the card is taller than the window, flexbox
   pushes the overflow above the top edge too, where it can never be scrolled to - the
   Bank of Uganda logo was cut off. Grow with the content instead, centre only when it fits
   ("safe center"; older browsers keep the flex-start line and simply start at the top).
   --------------------------------------------------------------------------- */
html.h-full { height: auto; min-height: 100%; }
.authentication-page {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: flex-start;
    align-items: safe center;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Keep the logo whole and in proportion; smaller on short windows so the form fits without scrolling. */
.header-logo { display: block; }
.header-logo img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
@media (max-height: 820px) {
    .header-logo img { width: auto !important; max-height: 72px; }
}
@media (max-height: 640px) {
    .header-logo img { max-height: 56px; }
}
