/* assets/css/auth.css - Simplified for Theme Inheritance */

/* Main Container */
#obs-auth-form {
    width: 100%;
    max-width: 450px;
    margin: 40px auto;
    /* Inherit font from theme */
}

.auth-container {
    width: 100%;
}

.auth-card {
    /* Kept minimal card styling, but removed gradients/specific shadows */
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 30px;
    position: relative;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .custom-logo-link {
    display: inline-block;
    max-width: 100%;
}

.auth-header .custom-logo {
    height: auto;
    max-width: 90px;
    width: auto;
}

.auth-title {
    font-size: 24px;
    /* Inherit font-family */
    font-weight: 700;
    margin: 0 0 10px 0;
    /* Removed custom gradient text */
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Inputs - keeping layout but removing colors */
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    /* Default fallback, theme might override input[type] */
    border-radius: 4px;
    height: 48px;
    box-sizing: border-box;
    text-align: center;
}

/* Buttons - relying on theme classes in PHP, but providing fallback layout */
.obs-auth-button {
    width: 100%;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    /* Colors should come from 'button button-primary' classes */
    margin-top: 10px;
    display: block;
}

.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Links */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.auth-link {
    text-decoration: none;
}

.obs-remember {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 4px 0 10px;
    cursor: pointer;
}

.obs-remember input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Alerts */
.alert {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 5px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Profile Alert */
.obs-profile-alert {
    background: #fff4f4;
    border: 1px solid #eee;
    border-left: 4px solid #d63638;
    color: #a00;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.obs-profile-alert .close-alert {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}

.obs-profile-alert a {
    color: #d63638;
    text-decoration: underline;
    font-weight: bold;
}

/* Input Direction */
#obs-auth-form input {
    text-align: center;
    direction: ltr;
}

#obs-auth-form input::placeholder {
    text-align: center;
    direction: rtl;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.8s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    #obs-auth-form {
        margin: 20px auto;
    }

    .auth-card {
        padding: 20px;
    }
}

#step-otp .text-center,
#otp-alert-msg {
    text-align: center;
}

#otp-wait-box {
    text-align: center;
    margin-top: 12px;
}

.otp-countdown-line {
    margin-top: 6px;
    font-weight: 700;
}

/* SweetAlert Input Fix */
.swal2-popup .swal2-input {
    box-sizing: border-box;
    width: 90% !important;
    max-width: 100%;
    margin: 20px auto;
}

/* Compact SweetAlert modals */
.swal2-popup {
    width: min(360px, 92vw) !important;
    padding: 1.1rem 0.9rem !important;
    border-radius: 12px !important;
}

.swal2-title {
    font-size: 1.9rem !important;
    margin: 0 0 0.35rem !important;
    line-height: 1.35 !important;
}

.swal2-html-container {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    margin: 0.35rem 0 0.75rem !important;
}

.swal2-icon {
    width: 3.8em !important;
    height: 3.8em !important;
    margin: 0.4em auto 0.8em !important;
}

.swal2-actions {
    margin: 0.7rem auto 0 !important;
    gap: 0.45rem !important;
}

.swal2-styled {
    margin: 0.2rem !important;
    padding: 0.5rem 1.15rem !important;
    font-size: 1rem !important;
    min-width: 84px !important;
}

/* User Profile Improvements */
#account_last_name_field {
    display: none !important;
}

.obs-password-hint {
    margin-bottom: 20px;
}

/* My Account dashboard cards */
.obs-account-top-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}

.obs-account-stat-card,
.obs-account-banner-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.obs-account-stat-card {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.obs-account-banner-card {
    grid-column: span 2;
    min-height: 110px;
}

.obs-stat-title,
.obs-banner-title {
    color: #475569;
    font-size: 13px;
    display: block;
}

.obs-stat-value {
    color: #0f172a;
    font-size: 28px;
    line-height: 1.1;
}

.obs-account-banner-card p {
    margin: 8px 0 12px;
    color: #1f2937;
}

.obs-banner-link {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #0ea5e9;
    color: #0369a1;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.obs-banner-link:hover {
    background: #0ea5e9;
    color: #ffffff;
}

@media (max-width: 1024px) {
    .obs-account-top-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .obs-account-banner-card {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .obs-account-top-grid {
        grid-template-columns: 1fr;
    }

    .obs-account-banner-card {
        grid-column: span 1;
    }
}
