/*
 * Arquivo para customizações CSS personalizadas
 * Este arquivo NÃO será sobrescrito pelo Tailwind build
 */

/* Customizações específicas do projeto */
.mascot-container {
    /* Estilos específicos para o mascote */
}

/* Links de Admin no Header */
.admin-nav-link {
    transition: all 0.2s ease-in-out;
}

.admin-nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Separador visual para links de admin */
.admin-nav-separator {
    background: linear-gradient(to bottom, transparent, rgba(107, 114, 128, 0.3), transparent);
}

/* Mascote de Manutenção */
.maintenance-mascot {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    padding: 15px;
    transition: all 0.3s ease;
    object-fit: cover;
    object-position: center;
}

/* Responsivo para mobile */
@media (max-width: 640px) {
    .maintenance-mascot {
        width: 150px;
        height: 150px;
        padding: 10px;
    }
}

.maintenance-mascot:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.maintenance-mascot.large {
    width: 300px;
    height: 300px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.maintenance-mascot.small {
    width: 150px;
    height: 150px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Container para páginas de manutenção */
.maintenance-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.maintenance-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    margin: 1rem;
}

/* Classes utilitárias customizadas */
.btn-custom {
    @apply bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-md transition-colors;
}

/* Media queries customizadas */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

.rounded-vm {
  border-radius: 1rem 0 1rem 0;
}

/* Melhorias Mobile */
@media (max-width: 768px) {
    /* Botões mais amigáveis ao toque */
    .btn-primary, .btn-custom {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 8px;
    }

    /* Espaçamento melhorado para cards */
    .card {
        margin-bottom: 1rem;
    }

    /* Newsletter form mobile */
    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        min-height: 44px;
    }

    /* Texto mais legível no mobile */
    .text-responsive {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Containers com padding adequado */
    .container-mobile {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Ajustes para tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .btn-primary, .btn-custom {
        min-height: 40px;
        padding: 10px 16px;
    }
}

/* Footer - Social media links */
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
    transition: all 0.25s ease;
}

.footer-social-link:hover {
    background: #1f2937;
    color: #fdc300;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-social-link:focus-visible {
    outline: 2px solid #1f2937;
    outline-offset: 2px;
}

/* Footer responsivo */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-grid > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-social-link {
        width: 44px;
        height: 44px;
    }
}

/* Utilitários adicionais (movidos do input.css) */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.touch-target {
    min-height: 44px;
    min-width: 44px;
}

.text-balance {
    text-wrap: balance;
}

.scrollbar-thin {
    scrollbar-width: thin;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.mascot-fixed {
    position: absolute;
    bottom: 0;
    object-fit: contain;
    object-position: bottom;
}

/* Sobrescrever estilos específicos se necessário */
.override-tailwind {
    /* Estilos que precisam sobrescrever o Tailwind */
}

/* ===================================================================
   SISTEMA DE VOUCHERS - Estilos Customizados
   =================================================================== */

/* Container principal de vouchers */
.voucher-container {
    position: relative;
    overflow: hidden;
}

/* Cards de vouchers */
.voucher-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.voucher-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Header do voucher */
.voucher-header {
    position: relative;
    overflow: hidden;
}

.voucher-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Código do voucher */
.voucher-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 0.1em;
    font-size: 1.5rem;
}

/* Animações para vouchers */
@keyframes voucher-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.voucher-badge-animate {
    animation: voucher-pulse 2s ease-in-out infinite;
}

/* Gradientes especiais para vouchers */
.voucher-gradient-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
}

.voucher-gradient-silver {
    background: linear-gradient(135deg, #E5E5E5 0%, #C0C0C0 50%, #A8A8A8 100%);
}

.voucher-gradient-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 50%, #A0522D 100%);
}

/* Efeito de impressão para vouchers */
@media print {
    .voucher-container {
        background: white !important;
        padding: 20px;
    }

    button,
    .no-print {
        display: none !important;
    }

    .voucher-card,
    .voucher-header {
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .voucher-code {
        border: 2px dashed #000;
        padding: 10px;
        display: inline-block;
    }
}

/* QR Code styling */
.voucher-qrcode {
    border: 4px solid currentColor;
    padding: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Status badges */
.voucher-status-valid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.voucher-status-expired {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.voucher-status-inactive {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(107, 114, 128, 0.3);
}

/* Barra de progresso do voucher */
.voucher-progress {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.voucher-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    position: relative;
    overflow: hidden;
}

.voucher-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: voucher-progress-shine 2s infinite;
}

@keyframes voucher-progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Mascote do voucher */
.voucher-mascot {
    animation: float 3s ease-in-out infinite;
}

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

/* Responsividade específica para vouchers */
@media (max-width: 640px) {
    .voucher-code {
        font-size: 1.25rem;
        letter-spacing: 0.05em;
    }

    .voucher-card {
        margin-bottom: 1rem;
    }

    .voucher-header h1 {
        font-size: 1.875rem;
    }
}

/* Linha tracejada de corte (para impressão) */
.voucher-cut-line {
    border-top: 2px dashed #cbd5e0;
    position: relative;
    margin: 2rem 0;
}

.voucher-cut-line::before,
.voucher-cut-line::after {
    content: '✂';
    position: absolute;
    top: -12px;
    background: white;
    padding: 0 8px;
    color: #cbd5e0;
}

.voucher-cut-line::before {
    left: 20px;
}

.voucher-cut-line::after {
    right: 20px;
}

/* Efeito hover nos botões do voucher */
.voucher-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.voucher-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.voucher-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading spinner para validação de voucher */
.voucher-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: currentColor;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ===================================================================
   ESTILOS DO CAPTCHA - Formulário de Contato
   =================================================================== */

/* Container principal do CAPTCHA */
.captcha-wrapper {
    width: 100%;
}

.captcha-field {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    width: 100%;
}

.captcha-field .max-w-md {
    max-width: 28rem; /* 448px */
}

/* Container da imagem do CAPTCHA */
.captcha-field img {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Campo de input do CAPTCHA */
.captcha-field input[type="text"] {
    background: white;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
    font-size: 1rem;
    letter-spacing: 0.025em;
}

.captcha-field input[type="text"]:focus {
    border-color: #fdc300;
    box-shadow: 0 0 0 3px rgba(253, 195, 0, 0.1);
}

/* Botão de refresh do CAPTCHA */
.captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: #373d81;
    border-color: #373d81;
    color: white;
    transform: rotate(180deg);
    box-shadow: 0 2px 8px rgba(55, 61, 129, 0.3);
}

.captcha-refresh:active {
    transform: rotate(180deg) scale(0.95);
}

.captcha-refresh svg {
    width: 18px;
    height: 18px;
}

/* Animações para o refresh */
@keyframes refreshSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.captcha-refresh.spinning {
    animation: refreshSpin 0.6s ease-in-out;
}

/* Responsividade do CAPTCHA */
@media (max-width: 640px) {
    .captcha-field {
        padding: 0.75rem;
    }

    .captcha-field img {
        max-width: 180px !important;
        height: auto !important;
    }

    .captcha-field input[type="text"] {
        padding: 0.75rem 1rem;
        font-size: 16px; /* Evita zoom no iOS/Safari */
    }

    .captcha-refresh {
        width: 44px;
        height: 44px;
        margin-top: 0.5rem;
    }

    .captcha-refresh:hover {
        transform: rotate(180deg) scale(1.05);
    }
}

@media (min-width: 641px) {
    .captcha-field img {
        max-width: 250px !important;
        height: auto !important;
    }
}

/* Estados de erro do CAPTCHA */
.captcha-field.error img {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.captcha-field.error input[type="text"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.captcha-field.error .captcha-refresh {
    border-color: #ef4444;
    color: #ef4444;
}

.captcha-field.error .captcha-refresh:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Loading state para o refresh */
.captcha-refresh.loading {
    pointer-events: none;
    opacity: 0.6;
}

.captcha-refresh.loading svg {
    animation: refreshSpin 1s linear infinite;
}

/* Melhorias de acessibilidade */
.captcha-refresh:focus {
    outline: 2px solid #373d81;
    outline-offset: 2px;
}

.captcha-field input[type="text"]:focus-visible {
    outline: 2px solid #373d81;
    outline-offset: 2px;
}

/* Efeito hover sutil na imagem */
.captcha-field img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================================================================
   PÁGINA SAC - Suporte ao Cliente
   =================================================================== */

/* Cards de serviço com hover suave */
.sac-service-card {
    position: relative;
    overflow: hidden;
}

.sac-service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.sac-service-card:hover::after {
    left: 100%;
}

/* FAQ com animações suaves */
details[open] summary {
    margin-bottom: 0.75rem;
}

details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

/* Mobile: melhor toque em FAQs */
@media (max-width: 768px) {
    details summary {
        padding: 1rem;
        margin: -0.75rem -1rem 0;
    }

    details[open] summary {
        margin-bottom: 0.5rem;
    }
}

/* CTA buttons com efeitos visuais */
.sac-cta-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.sac-cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.sac-cta-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Ícones com bounce suave no hover */
.sac-icon-bounce {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.sac-icon-bounce:hover {
    transform: scale(1.1) translateY(-2px);
}

/* Cards de link com melhor feedback visual */
.sac-link-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.sac-link-card:hover {
    border-color: #e5e7eb;
    background-color: #f9fafb !important;
    transform: translateX(4px);
}

/* Gradiente de hero animado */
@keyframes sac-gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.sac-hero-animated {
    background-size: 200% 200%;
    animation: sac-gradient-shift 15s ease infinite;
}

/* Badges de status/info */
.sac-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sac-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsividade aprimorada */
@media (max-width: 640px) {
    .sac-hero-animated {
        background-size: 300% 300%;
    }

    /* Botões de CTA em mobile com melhor área de toque */
    .sac-cta-btn {
        min-height: 48px;
        width: 100%;
        justify-content: center;
    }

    /* Cards empilhados com espaçamento adequado */
    .sac-service-card {
        margin-bottom: 1.5rem;
    }
}

/* Tablet: ajustes de grid */
@media (min-width: 768px) and (max-width: 1024px) {
    .sac-service-card {
        min-height: 400px;
    }
}

/* Desktop: hover states mais elaborados */
@media (hover: hover) and (pointer: fine) {
    .sac-service-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .sac-link-card:hover .sac-icon-bounce {
        transform: scale(1.15) rotate(5deg);
    }
}

/* Acessibilidade: foco visível */
.sac-cta-btn:focus-visible,
.sac-link-card:focus-visible,
details summary:focus-visible {
    outline: 3px solid #fdc300;
    outline-offset: 2px;
}

/* Loading states para links */
.sac-link-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.sac-link-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===================================================================
   TABLOIDES - Visualizador de PDF Otimizado
   =================================================================== */

/* Transições suaves do loading */
#loadingIndicator {
    transition: opacity 0.3s ease-in-out;
}

/* Estilo dos botões de controle */
.tabloid-control-btn {
    position: relative;
    overflow: hidden;
}

.tabloid-control-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.tabloid-control-btn:hover::before {
    width: 200px;
    height: 200px;
}

/* Animação de fade suave para troca de modos */
#pdfViewerContainer,
#flipbookContainer {
    transition: opacity 0.3s ease-in-out;
}

/* Melhorias no iframe do PDF */
#pdfFrame {
    background: #f9fafb;
}

/* Estados hover dos botões responsivos */
@media (hover: hover) {
    .tabloid-control-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    }
}

/* Touch feedback para mobile */
@media (hover: none) {
    .tabloid-control-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Container de controles responsivo */
@media (max-width: 640px) {
    .tabloid-control-btn {
        width: 100%;
        justify-content: center;
    }

    .tabloid-control-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Breadcrumb melhorado */
nav ul li a {
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fdc300;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Loading spinner personalizado */
@keyframes tabloid-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Estilos de cursor para flipbook */
.page-flipper,
.fallback-canvas-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.page-flipper canvas,
.fallback-canvas-container canvas {
    pointer-events: none;
    user-select: none;
}

/* Feedback visual do drag */
.page-flipper.touching {
    cursor: grabbing !important;
}

.swiping-next,
.swiping-prev {
    transition: transform 0.1s ease-out;
}

.swiping-next {
    transform: translateX(-5px);
}

.swiping-prev {
    transform: translateX(5px);
}

/* Indicador visual de direção */
.page-flipper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.swiping-next::after {
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2));
    opacity: 1;
}

.swiping-prev::after {
    left: 0;
    background: linear-gradient(270deg, transparent, rgba(16, 185, 129, 0.2));
    opacity: 1;
}

/* ===================================================================
   N8N CHAT WIDGET - Customizações Tailwind-Inspired
   =================================================================== */

/* Variáveis CSS customizadas seguindo o padrão do site */
:root {
    /* Cores principais do chat */
    --chat--color--primary: #fdc300;
    --chat--color--primary-hover: #e5b000;
    --chat--color--secondary: #373d81;
    --chat--color--secondary-hover: #2a2f66;

    /* Mensagens */
    --chat--message--bot--background: #f9fafb;
    --chat--message--bot--color: #1f2937;
    --chat--message--bot--border: #e5e7eb;
    --chat--message--user--background: #373d81;
    --chat--message--user--color: #ffffff;

    /* Input */
    --chat--input--background: #ffffff;
    --chat--input--border: #d1d5db;
    --chat--input--text: #1f2937;
    --chat--input--placeholder: #9ca3af;

    /* Botões */
    --chat--button--primary: #fdc300;
    --chat--button--primary-text: #1f2937;
    --chat--button--secondary: #373d81;
    --chat--button--secondary-text: #ffffff;

    /* Window */
    --chat--window--width: 400px;
    --chat--window--height: 600px;
    --chat--window--border-radius: 16px;

    /* Sombras (Tailwind style) */
    --chat--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --chat--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --chat--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --chat--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --chat--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --chat--shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ====================================
   BOTÃO TOGGLE (Launcher)
   ==================================== */
.chat-window-toggle {
    width: 64px !important;
    height: 64px !important;
    background: var(--chat--color--primary) !important;
    border-radius: 9999px !important;
    box-shadow: var(--chat--shadow-xl) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chat-window-toggle:hover {
    background: var(--chat--color--primary-hover) !important;
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: var(--chat--shadow-2xl), 0 0 0 4px rgba(253, 195, 0, 0.2) !important;
}

.chat-window-toggle svg {
    color: #1f2937 !important;
    fill: #1f2937 !important;
    width: 32px !important;
    height: 32px !important;
}

/* ====================================
   JANELA DO CHAT (Window)
   ==================================== */
.chat-window-wrapper {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 9999 !important;
}

.chat-window {
    width: var(--chat--window--width) !important;
    height: var(--chat--window--height) !important;
    border-radius: var(--chat--window--border-radius) !important;
    box-shadow: var(--chat--shadow-2xl) !important;
    overflow: hidden !important;
    border: 1px solid #e5e7eb !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: #ffffff !important;
}

.chat-layout,
.chat-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* ====================================
   HEADER DO CHAT
   ==================================== */
.chat-header {
    background: var(--chat--color--secondary) !important;
    padding: 1.25rem 1.5rem !important;
    border-bottom: none !important;
    box-shadow: var(--chat--shadow-sm) !important;
}

.chat-header * {
    color: #ffffff !important;
}

.chat-header h1,
.chat-heading h1 {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
}

.chat-header p {
    font-size: 0.875rem !important;
    opacity: 0.9 !important;
    margin-top: 0.25rem !important;
    margin-bottom: 0 !important;
}

/* Botões no header */
.chat-header button {
    color: #ffffff !important;
    opacity: 0.8 !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 0.5rem !important;
}

.chat-header button:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ====================================
   ÁREA DE MENSAGENS
   ==================================== */
.chat-body {
    flex: 1 !important;
    overflow-y: auto !important;
    background: #ffffff !important;
}

.chat-messages-list {
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

/* Base para mensagens */
.chat-message {
    display: block !important;
    padding: 0.875rem 1rem !important;
    border-radius: 0.75rem !important;
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
    word-wrap: break-word !important;
}

/* Mensagens do Bot */
.chat-message-from-bot {
    background: var(--chat--message--bot--background) !important;
    color: var(--chat--message--bot--color) !important;
    border: 1px solid var(--chat--message--bot--border) !important;
    border-radius: 0.75rem 0.75rem 0.75rem 0.25rem !important;
    box-shadow: var(--chat--shadow-sm) !important;
    max-width: 85% !important;
    align-self: flex-start !important;
}

/* Mensagens do Usuário */
.chat-message-from-user {
    background: var(--chat--message--user--background) !important;
    color: var(--chat--message--user--color) !important;
    border-radius: 0.75rem 0.75rem 0.25rem 0.75rem !important;
    box-shadow: var(--chat--shadow-md) !important;
    max-width: 85% !important;
    align-self: flex-end !important;
    border: none !important;
}

/* Markdown dentro das mensagens */
.chat-message-markdown {
    margin: 0 !important;
}

.chat-message-markdown p {
    margin: 0 !important;
    color: inherit !important;
}

/* Actions das mensagens */
.chat-message-actions {
    margin-bottom: 0.5rem !important;
    display: flex !important;
    gap: 0.5rem !important;
}

/* ====================================
   ÁREA DE INPUT (Footer)
   ==================================== */
.chat-footer {
    padding: 1rem 1.25rem !important;
    background: #f9fafb !important;
    border-top: 1px solid #e5e7eb !important;
}

.chat-input {
    display: flex !important;
    gap: 0.75rem !important;
    align-items: flex-end !important;
}

.chat-inputs {
    flex: 1 !important;
    display: flex !important;
    gap: 0.5rem !important;
    align-items: flex-end !important;
}

/* Campo de texto */
.chat-input textarea {
    flex: 1 !important;
    background: var(--chat--input--background) !important;
    border: 2px solid var(--chat--input--border) !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.9375rem !important;
    color: var(--chat--input--text) !important;
    transition: all 0.2s ease !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    line-height: 1.5 !important;
    resize: none !important;
    min-height: 50px !important;
    max-height: 120px !important;
}

.chat-input textarea::placeholder {
    color: var(--chat--input--placeholder) !important;
}


.chat-input textarea:focus {
    outline: none !important;
    border-color: var(--chat--color--primary) !important;
    box-shadow: 0 0 0 3px rgba(253, 195, 0, 0.15) !important;
}

/* Controles (botões) */
.chat-inputs-controls {
    display: flex !important;
    gap: 0.5rem !important;
}

/* Botão de enviar */
.chat-input-send-button {
    background: var(--chat--button--primary) !important;
    color: var(--chat--button--primary-text) !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: var(--chat--shadow) !important;
    cursor: pointer !important;
}

.chat-input-send-button:hover:not(:disabled) {
    background: var(--chat--color--primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--chat--shadow-md) !important;
}

.chat-input-send-button:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: #e5e7eb !important;
    color: #9ca3af !important;
}

.chat-input-send-button svg {
    width: 24px !important;
    height: 24px !important;
}

/* ====================================
   SCROLLBAR CUSTOMIZADO (Tailwind Style)
   ==================================== */
.chat-body::-webkit-scrollbar,
.chat-messages-list::-webkit-scrollbar {
    width: 8px !important;
}

.chat-body::-webkit-scrollbar-track,
.chat-messages-list::-webkit-scrollbar-track {
    background: #f3f4f6 !important;
    border-radius: 9999px !important;
}

.chat-body::-webkit-scrollbar-thumb,
.chat-messages-list::-webkit-scrollbar-thumb {
    background: #d1d5db !important;
    border-radius: 9999px !important;
    transition: background 0.2s ease !important;
}

.chat-body::-webkit-scrollbar-thumb:hover,
.chat-messages-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af !important;
}

/* ====================================
   INDICADOR DE DIGITAÇÃO
   ==================================== */
.chat-message.typing-indicator,
[class*="typing"] {
    padding: 0.75rem 1rem !important;
    background: var(--chat--message--bot--background) !important;
    border: 1px solid var(--chat--message--bot--border) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--chat--shadow-sm) !important;
    max-width: 85% !important;
    align-self: flex-start !important;
}

.typing-indicator span,
[class*="typing"] span {
    display: inline-block !important;
    background: var(--chat--color--secondary) !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    margin: 0 2px !important;
    animation: typing-bounce 1.4s infinite ease-in-out !important;
}

.typing-indicator span:nth-child(2),
[class*="typing"] span:nth-child(2) {
    animation-delay: 0.2s !important;
}

.typing-indicator span:nth-child(3),
[class*="typing"] span:nth-child(3) {
    animation-delay: 0.4s !important;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ====================================
   RESPONSIVIDADE (Mobile-First Tailwind Style)
   ==================================== */

/* Mobile (< 640px) */
@media (max-width: 640px) {
    :root {
        --chat--window--width: 100vw;
        --chat--window--height: 100vh;
        --chat--window--border-radius: 0px;
    }

    .chat-window-wrapper {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
    }

    .chat-window {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .chat-window-toggle {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
    }

    .chat-header {
        padding: 1rem !important;
    }

    .chat-message-from-bot,
    .chat-message-from-user {
        max-width: 90% !important;
    }

    .chat-input textarea {
        font-size: 16px !important; /* Previne zoom no iOS */
    }
}

/* Tablet (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    :root {
        --chat--window--width: 380px;
        --chat--window--height: 550px;
    }

    .chat-window-wrapper {
        bottom: 20px !important;
        right: 20px !important;
    }

    .chat-window-toggle {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Desktop (> 1024px) */
@media (min-width: 1025px) {
    .chat-window-wrapper {
        bottom: 24px !important;
        right: 24px !important;
    }

    .chat-window-toggle {
        width: 64px !important;
        height: 64px !important;
    }
}

/* ====================================
   ANIMAÇÕES (Tailwind Transitions)
   ==================================== */
@keyframes chat-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chat-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chat-window {
    animation: chat-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.chat-message {
    animation: chat-fade-in 0.2s ease-out !important;
}

/* ====================================
   ACESSIBILIDADE (Tailwind Focus Rings)
   ==================================== */
.chat-window-toggle:focus-visible,
.chat-input-send-button:focus-visible,
.chat-input textarea:focus-visible,
.chat-header button:focus-visible {
    outline: 3px solid var(--chat--color--primary) !important;
    outline-offset: 2px !important;
}

/* Redução de movimento (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
    .chat-window,
    .chat-message,
    .chat-window-toggle,
    .chat-input-send-button,
    .typing-indicator span {
        animation: none !important;
        transition: none !important;
    }
}

/* ====================================
   ESTADOS ADICIONAIS
   ==================================== */

/* Estado de carregamento */
.chat-loading {
    pointer-events: none !important;
    opacity: 0.6 !important;
}

/* Estado de erro */
.chat-error {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
}

/* Links dentro das mensagens */
.chat-message-markdown a {
    color: var(--chat--color--primary) !important;
    text-decoration: underline !important;
    transition: opacity 0.2s ease !important;
}

.chat-message-markdown a:hover {
    opacity: 0.8 !important;
}

/* Mensagens do usuário com links */
.chat-message-from-user .chat-message-markdown a {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* ===================================================================
   SISTEMA DE BANNERS - Aspect Ratio Inteligente
   =================================================================== */

/* Container base para banners */
.banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Picture element com aspect ratio */
.banner-picture {
    display: block;
    width: 100%;
    position: relative;
}

/* Imagem do banner com object-fit */
.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Desktop: Aspect ratio 21:9 (ultrawide para banners modernos) */
@media (min-width: 1024px) {
    .banner-container {
        aspect-ratio: 21 / 9;
    }
}

/* Tablet: Aspect ratio 16:9 (padrão para tablets) */
@media (min-width: 768px) and (max-width: 1023px) {
    .banner-container {
        aspect-ratio: 16 / 9;
    }
}

/* Mobile: Aspect ratio 4:3 (mais vertical para melhor visualização) */
@media (max-width: 767px) {
    .banner-container {
        aspect-ratio: 4 / 3;
    }
}

/* Transição suave ao carregar imagens */
.banner-image {
    transition: opacity 0.3s ease-in-out;
}

/* Animação de fade-in quando a imagem carrega */
@keyframes banner-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.banner-image {
    animation: banner-fade-in 0.5s ease-in-out;
}

/* Hover effect sutil (apenas em dispositivos com hover) */
@media (hover: hover) and (pointer: fine) {
    .banner-container:hover .banner-image {
        transform: scale(1.02);
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

