/**
 * Form Loader & Button Styles
 */

/* Button Loader Animation */
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Spinner Animation */
.spinner-border-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Button Loading State */
.btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Smooth Transition */
.btn {
    transition: all 0.3s ease;
}

/* Form Control Focus */
.form-control:focus {
    border-color: #2e2db9;
    box-shadow: 0 0 0 0.2rem rgba(46, 45, 185, 0.25);
}

/* Error State */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Success State */
.form-control.is-valid {
    border-color: #28a745;
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Label Styling */
label {
    font-weight: 500;
    color: #333;
}

/* Input Placeholder */
.form-control::placeholder {
    color: #999;
    font-style: italic;
}

/* Button Hover Effect */
.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 45, 185, 0.3);
}

/* Button Active Effect */
.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

/* Loading Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
}

/* Form Container */
.login-box {
    animation: fadeIn 0.3s ease-in;
}

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

/* Responsive Adjustments */
@media (max-width: 576px) {
    .login-box {
        padding: 15px;
    }

    .btn-login {
        padding: 8px 16px;
        font-size: 14px;
    }

    .form-control {
        font-size: 14px;
    }
}
