/**
 * 🔄 CSS Reset & Base Styles
 * Normalização e estilos base para consistência cross-browser
 * 
 * @version 2.0.0
 * @author BluePartner Team
 * @date 2025-10-01
 */

/* ========================================
   Reset Universal
   ======================================== */

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

/* ========================================
   Elementos Base
   ======================================== */

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gradient-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Tipografia Base
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin: 0;
    line-height: 1.6;
}

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

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

/* ========================================
   Listas
   ======================================== */

ul, ol {
    list-style: none;
}

/* ========================================
   Mídia
   ======================================== */

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========================================
   Formulários
   ======================================== */

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ========================================
   Tabelas
   ======================================== */

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* ========================================
   Scrollbar Customizado
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color-strong);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* ========================================
   Seleção de Texto
   ======================================== */

::selection {
    background: var(--accent-color);
    color: var(--text-primary);
}

::-moz-selection {
    background: var(--accent-color);
    color: var(--text-primary);
}

/* ========================================
   Acessibilidade
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visível para acessibilidade */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ========================================
   Animações Globais
   ======================================== */

@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;
    }
}

/* ========================================
   Loading State
   ======================================== */

[data-loading="true"] {
    pointer-events: none;
    opacity: 0.6;
    cursor: wait;
}
