/* 
 * Estilos adicionais para o sistema de contato
 * Adicione este CSS ao seu arquivo principal ou inclua como arquivo separado
 */

/* ============================================
   ALERTAS E MENSAGENS DE FEEDBACK
============================================ */

.alert-custom {
    border-radius: 15px;
    padding: 20px 25px;
    margin: 20px 0;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success-custom {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-error-custom {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.alert-info-custom {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.alert-warning-custom {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    color: #856404;
    border-left: 5px solid #ffc107;
}

.alert-custom i {
    font-size: 1.5rem;
    margin-right: 15px;
    vertical-align: middle;
}

.alert-custom .close-btn {
    float: right;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.alert-custom .close-btn:hover {
    opacity: 1;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid #7a9b76;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   VALIDAÇÃO DE FORMULÁRIO
============================================ */

.form-control.is-valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback,
.valid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.invalid-feedback {
    color: #dc3545;
}

.valid-feedback {
    color: #28a745;
}

/* ============================================
   PROTOCOLO DE ATENDIMENTO
============================================ */

.protocolo-badge {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(135deg, #7a9b76 0%, #5a7a56 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(122, 155, 118, 0.3);
}

/* ============================================
   BOTÕES ADICIONAIS
============================================ */

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

.btn-email {
    background: #EA4335;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-email:hover {
    background: #C5221F;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(234, 67, 53, 0.4);
    color: white;
}

/* ============================================
   TOOLTIP CUSTOMIZADO
============================================ */

.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
}

.tooltip-custom .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip-custom:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ============================================
   BADGE DE STATUS
============================================ */

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pendente {
    background: #ffc107;
    color: #000;
}

.status-badge.validado {
    background: #28a745;
    color: white;
}

.status-badge.respondido {
    background: #17a2b8;
    color: white;
}

.status-badge.arquivado {
    background: #6c757d;
    color: white;
}

/* ============================================
   CONTADOR DE CARACTERES
============================================ */

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.danger {
    color: #dc3545;
}

/* ============================================
   ANIMAÇÕES ADICIONAIS
============================================ */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.bounce-animation {
    animation: bounce 1s;
}

/* ============================================
   SCROLL TO TOP BUTTON
============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(122, 155, 118, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(122, 155, 118, 0.5);
}

.scroll-to-top.show {
    display: flex;
}

/* ============================================
   PRINT STYLES
============================================ */

@media print {
    .navbar,
    .footer,
    .btn,
    .social-links,
    .scroll-to-top {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .post-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ============================================
   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-width: 0;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus visible para navegação por teclado */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   DARK MODE (OPCIONAL)
============================================ */

@media (prefers-color-scheme: dark) {
    /* Adicione estilos de modo escuro aqui se desejar */
}

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

@media (max-width: 480px) {
    .alert-custom {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .protocolo-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}
