/*
Theme Name: Foto Ideal Studio Versão 9.7.4
Theme URI: https://fotoideal.studio
Description: Sistema de seleção de fotos para fotógrafos - Versão 9.7.4
Version: 9.7.4
Author: Foto Ideal Studio
Author URI: https://fotoideal.studio
Text Domain: fotoideal
*/

/* Variáveis CSS: assets/css/tokens.css (enqueue antes deste ficheiro) */

/* ==========================================
   RESET & BASE
   ========================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: var(--color-bg);
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-link-hover);
}

/* ==========================================
   ANIMACOES GLOBAIS
   ========================================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 0 40px rgba(255, 255, 255, 0.2); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in { animation: fadeIn 0.6s ease both; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }
.animate-scale-in { animation: scaleIn 0.5s ease both; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ==========================================
   UTILITÁRIOS
   ========================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.gradient-text {
    color: var(--color-primary);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

/* Botão, cartão, campo, badge e alerta: assets/css/shared/components.css */

a:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--color-border-accent);
    font-weight: 500;
}

.toast.success {
    border-left-color: var(--color-success);
}

.toast.error {
    border-left-color: var(--color-error);
}

.toast.info {
    border-left-color: var(--color-info);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ==========================================
   SPINNER / LOADING
   ========================================== */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-primary-muted);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Tela de boot: círculo laranja, sem texto. Some com .fotoideal-page-ready */
html:not(.fotoideal-page-ready) {
    overflow: hidden;
}

html::before,
html::after {
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

html::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 100000;
    pointer-events: auto;
}

html::after {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    border: 3px solid var(--color-primary-border);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-round);
    aspect-ratio: 1;
    flex-shrink: 0;
    animation: fotoideal-page-spin 0.7s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 100001;
    pointer-events: none;
}

html.fotoideal-page-ready::before,
html.fotoideal-page-ready::after {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

html.fotoideal-page-ready::after {
    animation: none;
}

@keyframes fotoideal-page-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    html::after {
        animation: none;
    }
}

/* ==========================================
   DECORATIVE ELEMENTS
   ========================================== */

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}

.bg-gradient-orbs {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.bg-gradient-orbs::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--color-primary-muted);
    top: -200px;
    left: -100px;
    animation: float 20s ease-in-out infinite;
}

.bg-gradient-orbs::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.05) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

/* ==========================================
   SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-soft);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-5);
    }
}

@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--spacing-4);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-4);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 var(--spacing-3);
    }
}

/* ==========================================
   ACESSIBILIDADE - MOVIMENTO REDUZIDO
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

