/* ===============================
   AUTH MODALS - MODERN DESIGN
   ================================ */

/* Modal Backdrop with Blur */
.auth-modal .modal-backdrop {
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.6);
}

/* Modal Content */
.auth-modal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Modal Header with Gradient */
.auth-modal .modal-header {
    background: linear-gradient(135deg, #0056b3, #003d82);
    color: white;
    border: none;
    padding: 20px 24px;
}

.auth-modal .modal-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.auth-modal .btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.auth-modal .btn-close-white:hover {
    opacity: 1;
}

/* Modal Body */
.auth-modal .modal-body {
    padding: 30px 24px;
}

/* Form Labels */
.auth-modal .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Input Group with Icon */
.input-group-icon {
    position: relative;
}

.input-group-icon .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #0056b3;
    font-size: 18px;
    z-index: 10;
}

.input-group-icon .form-control {
    padding-left: 45px;
}

/* Form Controls */
.auth-modal .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 12px 16px 12px 35px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-modal .form-control:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.15);
}

.auth-modal .form-control::placeholder {
    color: #adb5bd;
}

/* Checkbox */
.auth-modal .form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #ced4da;
    cursor: pointer;
}

.auth-modal .form-check-input:checked {
    background-color: #0056b3;
    border-color: #0056b3;
}

.auth-modal .form-check-label {
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    margin-left: 8px;
}

/* Submit Button */
.auth-submit-btn {
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Loading State */
.auth-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-submit-btn.loading .btn-text {
    opacity: 0.5;
}

.auth-submit-btn.loading .spinner-border {
    display: inline-block !important;
}

/* Error Alert */
.auth-modal .alert-danger {
    border-radius: 8px;
    border: none;
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-modal .alert-danger ul {
    margin: 0;
    padding-left: 20px;
}

.auth-modal .alert-danger li {
    margin-bottom: 4px;
}

/* Modal Footer */
.auth-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 16px 24px;
    background-color: #f8f9fa;
}

.auth-modal .modal-footer p {
    font-size: 14px;
    color: #6c757d;
}

/* Switch Link */
.auth-switch-link {
    color: #0056b3;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-switch-link:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Required Asterisk */
.text-danger {
    color: #dc3545;
}

/* Small Text */
.auth-modal small.text-muted {
    font-size: 12px;
    color: #6c757d;
    display: block;
    margin-top: 4px;
}

/* ===============================
   MOBILE RESPONSIVE
   ================================ */

@media (max-width: 768px) {
    .auth-modal .modal-dialog {
        margin: 20px;
    }

    .auth-modal .modal-body {
        padding: 24px 20px;
    }

    .auth-modal .modal-header {
        padding: 16px 20px;
    }

    .auth-modal .modal-title {
        font-size: 18px;
    }

    .auth-modal .form-control {
        padding: 10px 14px 10px 40px;
        font-size: 14px;
    }

    .input-group-icon .input-icon {
        left: 12px;
        font-size: 16px;
    }

    .auth-submit-btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    /* Stack columns on mobile */
    .auth-modal .row .col-md-6 {
        width: 100%;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .auth-modal .modal-dialog {
        margin: 10px;
    }

    .auth-modal .modal-body {
        padding: 20px 16px;
    }

    .auth-modal .modal-header {
        padding: 14px 16px;
    }
}

/* ===============================
   ANIMATIONS
   ================================ */

/* Modal Fade In */
.auth-modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.auth-modal.show .modal-dialog {
    transform: none;
}

/* Input Focus Animation */
.auth-modal .form-control {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Button Ripple Effect (Optional) */
.auth-submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-submit-btn:active::after {
    width: 300px;
    height: 300px;
}

/* ===============================
   ACCESSIBILITY
   ================================ */

/* Focus Visible for Keyboard Navigation */
.auth-modal .form-control:focus-visible,
.auth-modal .form-check-input:focus-visible,
.auth-modal .btn:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .auth-modal .form-control {
        border-width: 2px;
    }

    .auth-modal .modal-header {
        border-bottom: 2px solid white;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    .auth-modal .modal-dialog,
    .auth-modal .form-control,
    .auth-submit-btn {
        transition: none;
    }
}