/**
 * Unified Auth System CSS - Desktop + Mobile
 */

/* Mobile Auth Modal */
.mobile-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-auth-overlay.active {
    opacity: 1;
}

.mobile-auth-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    overflow-y: auto;
}

.mobile-auth-modal.active {
    transform: translateY(0);
}

.mobile-auth-header {
    padding: 1rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid #eee;
}

.mobile-auth-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 0 auto 1rem;
}

.mobile-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
}

.mobile-auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.mobile-auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-auth-tab.active {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

.mobile-auth-content {
    padding: 1.5rem;
}

.mobile-auth-form {
    display: none;
}

.mobile-auth-form.active {
    display: block;
}

.mobile-auth-form input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.mobile-auth-form input:focus {
    outline: none;
    border-color: #e74c3c;
}

.mobile-auth-btn {
    width: 100%;
    padding: 0.875rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.mobile-auth-btn:active {
    background: #007b7b;
}

/* Desktop Auth Modal */
.desktop-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.desktop-auth-overlay.active {
    opacity: 1;
}

.desktop-auth-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.desktop-auth-modal.active {
    transform: scale(1);
}

.desktop-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    z-index: 1;
}

.desktop-auth-close:hover {
    color: #333;
}

.desktop-auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.desktop-auth-tab {
    flex: 1;
    padding: 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.desktop-auth-tab.active {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

.desktop-auth-tab:hover {
    color: #333;
}

.desktop-auth-content {
    padding: 2rem;
}

.desktop-auth-form {
    display: none;
}

.desktop-auth-form.active {
    display: block;
}

.desktop-auth-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.desktop-auth-form input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.desktop-auth-form input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.desktop-auth-btn {
    width: 100%;
    padding: 0.875rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.desktop-auth-btn:hover {
    background: #007b7b;
}

/* Mobile specific */
@media (max-width: 767px) {
    .desktop-auth-overlay {
        display: none !important;
    }
}

/* Desktop specific */
@media (min-width: 768px) {
    .mobile-auth-overlay {
        display: none !important;
    }
}


/* ==========================================================================
   DARK THEME OVERRIDES
   ========================================================================== */

[data-theme="dark"] .mobile-auth-modal { background: var(--bg-card); }
[data-theme="dark"] .mobile-auth-header { border-bottom-color: var(--border-light); }
[data-theme="dark"] .mobile-auth-handle { background: var(--border); }
[data-theme="dark"] .mobile-auth-close { color: var(--text-secondary); }
[data-theme="dark"] .mobile-auth-tabs { border-bottom-color: var(--border-light); }
[data-theme="dark"] .mobile-auth-tab { color: var(--text-secondary); }
[data-theme="dark"] .mobile-auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
[data-theme="dark"] .mobile-auth-form input { background: var(--bg-input); border-color: var(--border); color: var(--text-primary); }
[data-theme="dark"] .mobile-auth-form input:focus { border-color: var(--primary); }

[data-theme="dark"] .desktop-auth-modal { background: var(--bg-card); }
[data-theme="dark"] .desktop-auth-close { color: var(--text-secondary); }
[data-theme="dark"] .desktop-auth-close:hover { color: var(--text-primary); }
[data-theme="dark"] .desktop-auth-tabs { border-bottom-color: var(--border-light); }
[data-theme="dark"] .desktop-auth-tab { color: var(--text-secondary); }
[data-theme="dark"] .desktop-auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
[data-theme="dark"] .desktop-auth-tab:hover { color: var(--text-primary); }
[data-theme="dark"] .desktop-auth-form h2 { color: var(--text-primary); }
[data-theme="dark"] .desktop-auth-form input { background: var(--bg-input); border-color: var(--border); color: var(--text-primary); }
[data-theme="dark"] .desktop-auth-form input:focus { border-color: var(--primary); }

/* Google Sign-In Button Container */
.google-signin-container {
    display: flex;
    justify-content: center;
    min-height: 44px;
}
.google-signin-container > div {
    width: 100% !important;
}
.google-signin-container iframe {
    margin: 0 auto;
}
