/* auth.css */

/* Fixed Logo Header */
.auth-logo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    z-index: 1000;
    margin: 1rem 0;
    /* border-bottom: 1px solid var(--border-color); */
}

.auth-logo-header .bestwish-logo {
    width: 180px;
    height: auto;
}

.auth-logo-header .bestwish-logo svg {
    width: 100%;
    height: auto;
}

/* Prevent logo style changes on interaction */
.auth-logo-header a:focus {
    outline: none;
    box-shadow: none;
}

.auth-logo-header a:focus-visible {
    outline: none;
    box-shadow: none;
}

.auth-logo-header a:active {
    outline: none;
    box-shadow: none;
}

/* Main Auth Section */
.auth-section {
    max-width: 540px;
    margin: 0 auto;
    padding: 2.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--bg-primary);
}

.auth-content {
    margin-top: 80px; /* Match the header height */
}

/* Google Icon */
.google-icon {
    height: 18px;
    width: 18px;
    flex-shrink: 0;
}

/* Divider styling */
.auth-divider {
    position: relative;
    text-align: center;
    /* margin: 1rem 0; */
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 1.5rem);
    height: 1px;
    background-color: var(--border-color);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider-text {
    background-color: var(--bg-primary);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Auth Steps */
.auth-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.auth-step.active {
    display: block;
    opacity: 1;
}

.auth-step.hidden {
    display: none;
}

/* Auth Buttons */
.auth-method-btn {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    transition: all var(--transition-standard);
    font-size: 1rem;
    font-weight: 500;
}

.auth-method-btn:hover:not(:disabled) {
    background-color: var(--bg-primary);
    transform: translateY(-1px);
    border-color: var(--border-color-hover);
}

.auth-method-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Form styling */
.auth-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 1rem;
    transition: border-color 0.2s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-blue-500);
    box-shadow: 0 0 0 2px rgba(45, 91, 255, 0.2);
}

/* OTP Input Styling */
.otp-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.otp-input {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-elevated);
}

.otp-input:focus {
    border-color: var(--brand-blue-500);
    box-shadow: 0 0 0 2px rgba(var(--brand-blue-500-rgb), 0.25);
}

/* Disable number input arrows */
.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Dark theme support */
[data-theme="dark"] .auth-method-btn {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .auth-method-btn:hover:not(:disabled) {
    background-color: var(--bg-elevated);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-section {
        padding: 1.5rem;
    }
    
    .auth-logo-header {
        height: 64px;
    }

    .auth-logo-header .bestwish-logo {
        width: 140px;
    }

    .auth-content {
        margin-top: 64px;
    }
}

@media (min-width: 1024px) {
    .auth-logo-header .bestwish-logo {
        width: 200px;
    }
}

/* Add these styles to the existing auth.css file */

.account-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.account-info {
    margin-bottom: 2rem;
}

.message-history {
    margin-top: 2rem;
}

.message-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.message-table th,
.message-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.message-table th {
    font-weight: 600;
    background-color: var(--bg-primary);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .account-section {
        padding: 1.5rem;
        margin: 1rem;
    }

    .message-table {
        font-size: 0.9rem;
    }

    .message-table th,
    .message-table td {
        padding: 0.5rem;
    }
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-link {
    display: block;
    color: var(--brand-blue-500);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease-in-out;
}

.auth-link:hover {
    color: var(--brand-purple-500);
}

/* Privacy Notice */
.privacy-notice {
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.privacy-notice a {
    color: var(--text-muted);
    transition: color var(--transition-standard);
}

.privacy-notice a:hover {
    color: var(--text-primary);
}

/* Alert Close Button Styles */
.btn-close-danger {
    filter: invert(36%) sepia(38%) saturate(3580%) hue-rotate(337deg) brightness(85%) contrast(98%);
    opacity: 0.8;
}

.btn-close-danger:hover {
    opacity: 1;
}

.btn-close-success {
    filter: invert(39%) sepia(68%) saturate(366%) hue-rotate(93deg) brightness(96%) contrast(89%);
    opacity: 0.8;
}

.btn-close-success:hover {
    opacity: 1;
}

/* Progress Indicator */
.progress-indicator {
    max-width: 300px;
    margin: 0 auto;
}

.progress-indicator .progress {
    margin-top: 0.5rem;
    background-color: var(--bs-gray-200);
    border-radius: 2rem;
}

.progress-indicator .progress-bar {
    background-color: var(--bs-primary);
    border-radius: 2rem;
}

/* Auth Context Box */
.auth-context {
    background: var(--bs-light);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.auth-context .fas {
    color: var(--bs-primary);
}

.auth-context p {
    line-height: 2;
}

/* Enhance mobile responsiveness */
@media (max-width: 576px) {
    .auth-context {
        padding: 1rem;
    }
    
    .progress-indicator {
        max-width: 100%;
        padding: 0 1rem;
    }
}