/* Login Container */
.login-container {
    background: var(--bg-grey);
}

.login-card {
    width: 100%;
    max-width: 28.125rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin: 1rem 0;
}

/* Form Elements */
.form-label.required::after {
    content: " *";
    color: #dc3545;
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: 0.0625rem solid var(--border-light);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(211, 164, 68, 0.25);
}

/* Buttons */
.tor-btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    transition: all 0.15s ease-in-out;
    position: relative;
    overflow: hidden;
}

.tor-btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.tor-btn-primary:active {
    transform: translateY(0);
}

.tor-btn-primary:disabled {
    background-color: #6b7280;
    border-color: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Keep primary color when button is in loading state */
.tor-btn-primary:disabled.loading-state {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    cursor: wait;
}

/* Button Loading State */
.btn[data-kt-indicator="on"] .indicator-label {
    display: none;
}

.btn[data-kt-indicator="on"] .indicator-progress {
    display: inline-flex;
    align-items: center;
}

.indicator-progress {
    display: none;
}

.indicator-label {
    display: inline-block;
}

/* Form Validation */

.text-danger {
    font-size: 0.875rem;
}

/* Custom Checkbox */
.tor-form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 0.125rem solid var(--border-light);
    border-radius: 0.25rem;
}

.tor-form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.tor-form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(211, 164, 68, 0.25);
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: 0.5rem;
    }
    
    .login-container {
        padding: 1rem 0.5rem;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Error Messages */
.error-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Page Title */
.page-title {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.page-subtitle {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Bootstrap Grid Utilities */
.flex-root {
    display: flex;
    flex: 1 1 auto;
}

.flex-column-fluid {
    flex: 1 1 auto;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bgi-position-y-bottom {
    background-position-y: bottom;
}

.position-x-center {
    background-position-x: center;
}

.bgi-no-repeat {
    background-repeat: no-repeat;
}

.bgi-size-contain {
    background-size: contain;
}

.bgi-attachment-fixed {
    background-attachment: fixed;
}

/* Google reCAPTCHA Responsive */
#html_element {
    display: flex;
    justify-content: start;
    overflow: hidden;
}

#html_element > div {
    transform-origin: 0 0;
}

/* Scale down reCAPTCHA on small screens and remove gaps */
@media (max-width: 576px) {
    #html_element {
        height: calc(78px * 0.85); /* Original height * scale factor */
    }
    
    #html_element > div {
        transform: scale(0.85);
        margin-bottom: calc(-78px * 0.15); /* Negative margin to remove gap */
    }
}

@media (max-width: 400px) {
    #html_element {
        height: calc(78px * 0.75); /* Original height * scale factor */
    }
    
    #html_element > div {
        transform: scale(0.75);
        margin-bottom: calc(-78px * 0.25); /* Negative margin to remove gap */
    }
}

/* Utility Classes */
.fs-12px {
    font-size: 0.79rem;
}
