/**
 * Shared Authentication CSS
 * Used across all pages for consistent sign-in UI
 */

/* ========== Google Sign-in Button ========== */
.google-signin-btn {
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #5a3e1b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.2s;
    white-space: nowrap;
}

.google-signin-btn:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    background: white;
}

.google-signin-btn img {
    width: 16px;
    height: 16px;
}

/* ========== User Avatar Button ========== */
.user-avatar-btn {
    background: linear-gradient(135deg, #e8d5b7, #d4a574);
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    width: 34px;
    height: 34px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #5a3e1b;
    letter-spacing: 0.5px;
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-btn .avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ========== User Dropdown Menu ========== */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    min-width: 180px;
    z-index: 500;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-name {
    padding: 14px 16px 10px;
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #f0e8d8;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 11px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}

.user-dropdown-item:hover {
    background: #f9f3e8;
}

.user-dropdown-signout {
    color: #888;
    border-top: 1px solid #f0e8d8;
}

.user-dropdown-signout:hover {
    color: #c0392b;
    background: #fdf0f0;
}

/* ========== Sign-in Dialog ========== */
.dialog-signin {
    margin-bottom: 16px;
    padding: 14px;
    background: #fdfbf5;
    border: 1px solid #f0e8d8;
    border-radius: 10px;
}

.dialog-signin > p {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.dialog-signin-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-signin-options .google-signin-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
}

.dialog-signin-divider {
    text-align: center;
    color: #aaa;
    font-size: 0.8rem;
    position: relative;
}

.dialog-signin-divider::before,
.dialog-signin-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #ddd;
}

.dialog-signin-divider::before { left: 0; }
.dialog-signin-divider::after { right: 0; }

/* ========== Email OTP Section ========== */
.email-otp-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-otp-row {
    display: flex;
    gap: 8px;
}

.email-otp-section input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.email-otp-section input:focus {
    outline: none;
    border-color: var(--primary-color, #8b4513);
}

.email-otp-section button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #8b4513);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.email-otp-section button:hover {
    opacity: 0.9;
}

.email-otp-section button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.email-otp-section input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.email-otp-section.disabled-section {
    opacity: 0.6;
}

.coming-soon-label {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    text-align: center;
}

/* ========== OTP Status Messages ========== */
.otp-status {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.otp-status.error {
    color: #c0392b;
}

.otp-status.success {
    color: #27ae60;
}

/* ========== Auth Required Notice (for gated features) ========== */
.auth-required-notice {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fff9e6, #fff5db);
    border-radius: 12px;
    border: 1px solid #d4a017;
}

.auth-required-notice h4 {
    color: #8b4513;
    margin-bottom: 10px;
}

.auth-required-notice p {
    color: #666;
    margin-bottom: 20px;
}

.auth-required-notice .google-signin-btn {
    margin: 0 auto;
}

/* ========== Responsive Styles ========== */
@media (max-width: 360px) {
    .google-signin-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    .user-avatar-btn {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
}
