/**
 * Site 4 Bio - Estilos Adicionais
 * Impressão e utilitários
 */

/* =====================================================
   ESTILOS DE IMPRESSÃO
   ===================================================== */
@media print {
    /* Ocultar elementos não imprimíveis */
    header,
    footer,
    nav,
    .no-print,
    #cookie-banner,
    #cookie-modal,
    #sidebar-menu,
    #sidebar-overlay,
    #back-to-top,
    .share-buttons,
    .adsbygoogle,
    ins.adsbygoogle,
    button,
    form {
        display: none !important;
    }
    
    /* Reset de cores para impressão */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    /* Forçar quebra de página antes de seções principais */
    section {
        page-break-inside: avoid;
    }
    
    /* Links visíveis na impressão */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    a[href^="#"]:after,
    a[href^="javascript"]:after {
        content: "";
    }
    
    /* Tabelas */
    table {
        border-collapse: collapse;
        width: 100%;
    }
    
    th, td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }
    
    /* Imagens */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    /* Cabeçalho de impressão */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #2d5016;
    }
    
    /* Rodapé de impressão */
    .print-footer {
        display: block !important;
        text-align: center;
        margin-top: 20px;
        padding-top: 10px;
        border-top: 1px solid #ddd;
        font-size: 10pt;
        color: #666;
    }
}

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

/* Line clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect ratio fallback */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* Focus visible para acessibilidade */
:focus-visible {
    outline: 2px solid #2d5016;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #2d5016;
    color: white;
}

::-moz-selection {
    background-color: #2d5016;
    color: white;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

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

/* Tabela nutricional customizada */
.nutrition-table {
    width: 100%;
    border-collapse: collapse;
}

.nutrition-table th,
.nutrition-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.nutrition-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #1a1a1a;
}

.nutrition-table tr:hover {
    background-color: #f9fafb;
}

.nutrition-table .value {
    font-weight: 500;
    color: #2d5016;
}

.nutrition-table .dv {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Badge/Tag styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 2px;
}

.badge-primary {
    background-color: rgba(45, 80, 22, 0.1);
    color: #2d5016;
}

.badge-secondary {
    background-color: rgba(139, 69, 19, 0.1);
    color: #8b4513;
}

.badge-success {
    background-color: rgba(34, 139, 34, 0.1);
    color: #228b22;
}

.badge-warning {
    background-color: rgba(218, 165, 32, 0.1);
    color: #b8860b;
}

.badge-danger {
    background-color: rgba(139, 0, 0, 0.1);
    color: #8b0000;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

/* Gradientes úteis */
.gradient-primary {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c23 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #d4a574 0%, #deb887 100%);
}
