/* Login/Auth Page Styles */

.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(98, 182, 203, 0.1) 0%, rgba(13, 27, 42, 0.05) 100%);
}

.auth-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Toggle Buttons */
.auth-toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.toggle-btn {
    background: white;
    border: 2px solid rgba(98, 182, 203, 0.3);
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.toggle-btn:hover {
    border-color: var(--accent-sky);
    color: var(--accent-sky);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 182, 203, 0.2);
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--accent-sky), var(--primary-light));
    border-color: var(--accent-sky);
    color: white;
    box-shadow: 0 4px 15px rgba(98, 182, 203, 0.3);
}

.toggle-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(98, 182, 203, 0.4);
}

.auth-card-wrapper {
    position: relative;
    width: 100%;
    min-height: 450px;
    margin: 0 auto;
}

.auth-card {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s;
    pointer-events: none;
}

.auth-card.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.auth-card-inner {
    position: relative;
    width: 100%;
}

.auth-card-front {
    position: relative;
    width: 100%;
}

/* Card styling */
.auth-card-front {
    background: white;
    border-radius: 20px;
    padding: 40px 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(98, 182, 203, 0.2);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.auth-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-sky), var(--primary-light));
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-top: 10px;
}

.auth-header h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--dark-text);
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.auth-form .row {
    margin-left: -10px;
    margin-right: -10px;
}

.auth-form .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

.form-group label {
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid rgba(98, 182, 203, 0.2);
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
    width: 100%;
}

.form-control:hover {
    border-color: rgba(98, 182, 203, 0.4);
}

.form-control:focus {
    border-color: var(--accent-sky);
    box-shadow: 0 0 0 0.2rem rgba(98, 182, 203, 0.25);
    background-color: white;
    outline: none;
}

.form-control::placeholder {
    color: #999;
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.form-check-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.form-check-input {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: var(--accent-sky);
    border-color: var(--accent-sky);
}

.form-check-label {
    color: var(--dark-text);
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
    line-height: 1.5;
    white-space: nowrap;
}

.form-check-label a {
    color: var(--accent-sky);
    text-decoration: none;
    white-space: normal;
}

.form-check-label a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.forgot-password {
    color: var(--accent-sky);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.forgot-password:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Field Alert Messages (for individual fields) */
.field-alert {
    display: none;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 5px;
    font-size: 0.85rem;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
    position: relative;
    padding-right: 30px;
}

.field-alert.show {
    display: block;
}

.field-alert.error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.field-alert.error::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
}

/* Alert Messages (for general messages) */
.alert-message {
    display: none;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
    position: relative;
    padding-right: 40px;
}

.alert-message.show {
    display: block;
}

.alert-message.error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-message.error::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

.alert-message.success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

.alert-message.success::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to login link */
.back-to-login {
    color: var(--accent-sky);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.back-to-login:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.auth-form .btn {
    margin-top: 10px;
    padding: 12px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.auth-form .btn-primary {
    background-color: var(--accent-sky);
    border-color: var(--accent-sky);
}

.auth-form .btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(98, 182, 203, 0.4);
}

.auth-form .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(98, 182, 203, 0.25);
}

.auth-form .btn-outline-primary {
    border-color: var(--accent-sky);
    color: var(--accent-sky);
}

.auth-form .btn-outline-primary:hover {
    background-color: var(--accent-sky);
    border-color: var(--accent-sky);
    color: white;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.auth-divider span {
    background-color: white;
    padding: 0 15px;
    color: var(--dark-text);
    position: relative;
    font-size: 0.9rem;
}

/* Links in form */
.form-check-label a,
.forgot-password {
    color: var(--accent-sky);
    text-decoration: none;
}

.form-check-label a:hover,
.forgot-password:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.maay {
    color: chocolate;
    text-decoration: none;
    font-weight: 600;
}

.maay:hover {
    color: var(--accent-sky);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-section {
        padding: 40px 15px;
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-toggle-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .toggle-btn {
        width: 100%;
        padding: 10px 20px;
    }
    
    .auth-card-wrapper {
        min-height: auto;
    }
    
    .auth-card-wrapper:has(#registerCard.active) {
        min-height: auto;
    }
    
    .auth-card-wrapper:has(#loginCard.active) {
        min-height: auto;
    }
    
    .auth-card-front {
        padding: 30px 25px;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .forgot-password {
        align-self: flex-start;
    }
    
    /* On mobile, stack form fields vertically */
    .auth-form .row {
        margin: 0;
    }
    
    .auth-form .col-md-6 {
        padding: 0;
        margin-bottom: 0;
    }
}

/* Remove fadeInUp animation as we use custom transitions */

/* Smooth transition enhancement */
.auth-card {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s;
}

/* Prevent layout shift */
.auth-card-wrapper {
    transition: min-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Register card has more content, adjust min-height when active */
.auth-card-wrapper:has(#registerCard.active) {
    min-height: 500px;
}

.auth-card-wrapper:has(#loginCard.active) {
    min-height: 450px;
}

/* Ensure smooth transitions without layout jumps */
.auth-section {
    overflow: visible;
}

/* Smooth scroll behavior when switching forms */
html {
    scroll-behavior: smooth;
}

