/**
 * TUH Account - Base CSS
 * Reset, variáveis e estilos fundamentais
 *
 * @package TUH_Account
 * @since 1.1.0
 */

/* ===========================================
   CSS VARIABLES (defaults, overwritten by customizer)
   =========================================== */
:root {
    /* Cores principais */
    --tuh-account-primary: #8C52FF;
    --tuh-account-primary-hover: #7040d9;
    --tuh-account-secondary: #6930C3;
    --tuh-account-accent: #e67e22;

    /* Backgrounds */
    --tuh-account-bg: #f8f9fa;
    --tuh-account-card-bg: #ffffff;
    --tuh-account-header-bg: #ffffff;
    --tuh-account-nav-bg: #ffffff;
    --tuh-account-nav-active-bg: #f5f3ff;

    /* Textos */
    --tuh-account-text: #333333;
    --tuh-account-text-light: #666666;
    --tuh-account-text-muted: #999999;
    --tuh-account-heading: #1a1a2e;

    /* Status */
    --tuh-account-success: #28a745;
    --tuh-account-warning: #ffc107;
    --tuh-account-danger: #dc3545;
    --tuh-account-info: #17a2b8;

    /* Bordas e sombras */
    --tuh-account-border: #e0e0e0;
    --tuh-account-shadow-color: rgba(0, 0, 0, 0.08);
    --tuh-account-shadow: 0 2px 8px var(--tuh-account-shadow-color);
    --tuh-account-shadow-lg: 0 4px 20px var(--tuh-account-shadow-color);

    /* Botões */
    --tuh-account-btn-text: #ffffff;
    --tuh-account-btn-secondary-bg: #f8f9fa;
    --tuh-account-btn-secondary-text: #333333;

    /* Links */
    --tuh-account-link: #8C52FF;
    --tuh-account-link-hover: #7040d9;

    /* Espaçamentos */
    --tuh-account-radius: 8px;
    --tuh-account-radius-lg: 12px;
    --tuh-account-gap: 24px;
    --tuh-account-gap-sm: 16px;

    /* Transições */
    --tuh-account-transition: 0.3s ease;
}

/* ===========================================
   CSS RESET E ISOLAMENTO
   =========================================== */
.tuh-account-wrapper,
.tuh-account-wrapper *,
.tuh-account-wrapper *::before,
.tuh-account-wrapper *::after,
.tuh-account-login-wrapper,
.tuh-account-login-wrapper *,
.tuh-account-login-wrapper *::before,
.tuh-account-login-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===========================================
   WRAPPER PRINCIPAL
   =========================================== */
.tuh-account-wrapper {
    isolation: isolate;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--tuh-account-text);
    background: var(--tuh-account-bg);
    min-height: 60vh;
}

/* ===========================================
   TIPOGRAFIA BASE
   =========================================== */
.tuh-account-wrapper h1,
.tuh-account-wrapper h2,
.tuh-account-wrapper h3,
.tuh-account-wrapper h4 {
    color: var(--tuh-account-heading);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 16px;
}

.tuh-account-wrapper h1 { font-size: 1.75rem; }
.tuh-account-wrapper h2 { font-size: 1.5rem; }
.tuh-account-wrapper h3 { font-size: 1.25rem; }
.tuh-account-wrapper h4 { font-size: 1rem; }

.tuh-account-wrapper p {
    margin: 0 0 16px;
    line-height: 1.6;
}

.tuh-account-wrapper a {
    color: var(--tuh-account-link);
    text-decoration: none;
    transition: color var(--tuh-account-transition);
}

.tuh-account-wrapper a:hover {
    color: var(--tuh-account-link-hover);
}

/* ===========================================
   UTILITIES
   =========================================== */
.tuh-account-text-center { text-align: center; }
.tuh-account-text-right { text-align: right; }
.tuh-account-text-muted { color: var(--tuh-account-text-muted); }
.tuh-account-text-success { color: var(--tuh-account-success); }
.tuh-account-text-danger { color: var(--tuh-account-danger); }
.tuh-account-text-warning { color: var(--tuh-account-warning); }

.tuh-account-mt-0 { margin-top: 0; }
.tuh-account-mb-0 { margin-bottom: 0; }
.tuh-account-mt-1 { margin-top: 8px; }
.tuh-account-mb-1 { margin-bottom: 8px; }
.tuh-account-mt-2 { margin-top: 16px; }
.tuh-account-mb-2 { margin-bottom: 16px; }
.tuh-account-mt-3 { margin-top: 24px; }
.tuh-account-mb-3 { margin-bottom: 24px; }

.tuh-account-hidden { display: none; }
.tuh-account-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .tuh-account-wrapper {
        padding: 20px 16px;
    }

    .tuh-account-wrapper h1 { font-size: 1.5rem; }
    .tuh-account-wrapper h2 { font-size: 1.25rem; }
}

/* ===========================================
   GOOGLE LOGIN OVERLAY
   =========================================== */
.tuh-google-login-overlay {
    position: fixed;
    inset: 0;
    background: var(--tuh-overlay, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.tuh-google-login-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.tuh-google-login-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-radius: 12px;
    background: var(--tuh-card-bg, var(--tuh-account-card-bg, #111827));
    color: var(--tuh-text-primary, var(--tuh-account-text, #f8fafc));
    border: 1px solid var(--tuh-card-border, rgba(255, 255, 255, 0.08));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 240px;
}

.tuh-google-login-text {
    font-size: 0.95rem;
    line-height: 1.4;
}

.tuh-google-login-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--tuh-primary, var(--tuh-account-primary, #2563eb));
    animation: tuh-google-spin 0.9s linear infinite;
}

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