/* ============================================
   TUPI FRIO - ADDITIONAL STYLES
   Estilos adicionais e melhorias
   ============================================ */

/* ========== LOADING STATE ========== */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

/* ========== SMOOTH TRANSITIONS ========== */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ========== FORM IMPROVEMENTS ========== */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* ========== BUTTON STATES ========== */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== IMAGE LOADING ========== */
img {
    transition: opacity 0.3s ease;
}

img:not(.loaded) {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

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

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #004494;
}

/* ========== SELECTION ========== */
::selection {
    background: #0056b3;
    color: white;
}

::-moz-selection {
    background: #0056b3;
    color: white;
}

/* ========== FOCUS VISIBLE ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* ========== PREFERS REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== PRINT OPTIMIZATIONS ========== */
@media print {
    body {
        font-size: 12pt;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .no-print {
        display: none !important;
    }
}

/* ========== DARK MODE SUPPORT (Future) ========== */
@media (prefers-color-scheme: dark) {
    /* Descomente para habilitar modo escuro no futuro */
    /*
    :root {
        --bg-white: #1a1a1a;
        --text-dark: #e0e0e0;
        --text-light: #b0b0b0;
        --bg-light: #2a2a2a;
    }
    */
}