/**
 * Smart PDV Landing Page - CSS Customizado
 * Estilos personalizados separados do HTML para melhor organização e cache
 */

/* Reset e Tipografia */
* {
    font-family: 'Poppins', sans-serif;
}

/* Animações personalizadas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Background Hero - Azul sólido mais suave */
.hero-bg {
    background: #3366CC;
}

.gradient-text {
    color: #3366CC;
}

/* Efeito de hover nos cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Form responses */
.form-response {
    margin-top: 20px;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-response.success {
    background-color: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.form-response.error {
    background-color: rgba(248, 113, 113, 0.15);
    color: #dc2626;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.alternative-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.alternative-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    color: white;
}

.alternative-btn i {
    margin-right: 8px;
    font-size: 18px;
}

.alternative-btn:hover {
    transform: translateY(-2px);
}

.alternative-btn:active {
    transform: translateY(0);
}

.alternative-btn.email {
    background-color: #2563eb;
}

.alternative-btn.email:hover {
    background-color: #1d4ed8;
}

.alternative-btn.whatsapp {
    background-color: #22c55e;
}

.alternative-btn.whatsapp:hover {
    background-color: #16a34a;
}

.error-message {
    margin-bottom: 12px;
    margin-top: 8px;
    font-weight: 500;
    color: #dc2626;
    font-size: 0.875rem;
}

.error-message.hidden {
    display: none;
}

/* Focus visível para acessibilidade (apenas com teclado, não com mouse) */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Remover outline quando não é focus-visible (clique com mouse) */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Campos de formulário inválidos */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: #dc2626;
    border-width: 2px;
}

input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
    ring-color: #dc2626;
    border-color: #dc2626;
}

.debug-info {
    margin-top: 16px;
    padding: 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    font-family: "Fira Code", monospace;
    max-height: 200px;
    overflow: auto;
    display: none;
}

.debug-info pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.debug-toggle {
    display: none !important;
}

.cors-warning {
    display: none;
}

/* Details/Spoiler Styling */
details {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

details:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

details[open] {
    background-color: #ffffff;
    border-color: #3b82f6;
}

details summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    outline: none;
}

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

details summary::marker {
    display: none;
}

details summary i {
    transition: transform 0.3s ease;
}

details[open] summary i {
    transform: rotate(180deg);
}

/* Melhorias de contraste para acessibilidade */
.text-white-accessible {
    color: rgba(255, 255, 255, 0.95); /* Melhor contraste que /90 ou /80 */
}

/* Media Queries */
@media (min-width: 768px) {
    .alternative-options {
        flex-direction: row;
    }

    .alternative-btn {
        flex: 1;
    }
}

/* FAQ - Rotação do ícone */
.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question i.rotate-180 {
    transform: rotate(180deg);
}
