﻿body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.survey-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 2rem auto;
    max-width: 900px;
}

.survey-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.progress-container {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.5rem;
    margin-top: 1rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.3);
}

.progress-bar {
    background: #ffc107;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.topic-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .topic-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    }

.topic-header {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-bottom: 3px solid #667eea;
}

.question-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f3f4;
}

    .question-item:last-child {
        border-bottom: none;
    }

/* Destaque para pergunta com erro */
.pergunta-destaque {
    animation: destacar 2s ease-in-out;
    border: 2px solid #dc3545 !important;
    border-radius: 8px;
}

@keyframes destacar {
    0%, 100% {
        border-color: #dc3545;
        box-shadow: none;
    }

    50% {
        border-color: #dc3545;
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
    }
}

/* Preview de anexos */
.anexo-item {
    transition: transform 0.2s ease;
}

    .anexo-item:hover {
        transform: scale(1.05);
    }

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
.rating-scale {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1rem 0;
}

.rating-option {
    position: relative;
}

    .rating-option input[type="radio"] {
        display: none;
    }

.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

    .rating-label:hover {
        border-color: #667eea;
        background: #f8f9ff;
    }

.rating-option input[type="radio"]:checked + .rating-label {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.rating-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.navigation-buttons {
    padding: 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-survey {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary-survey {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

    .btn-primary-survey:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

.btn-outline-secondary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

    .btn-outline-secondary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

.welcome-screen, .final-screen {
    text-align: center;
    padding: 3rem 2rem;
}

.welcome-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* ===== PLACEHOLDERS ANIMADOS ===== */
.form-control::placeholder,
.form-select option[value=""] {
    color: #6c757d;
    opacity: 0.8;
    font-style: italic;
    transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.5;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Placeholder personalizado para campos obrigatórios */
.form-control[required]::placeholder::after {
    content: " *";
    color: #dc3545;
}

/* Animação sutil para campos com foco */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Estilo para campos preenchidos */
.form-control:valid:not(:placeholder-shown) {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.44 1.44L7.4 4.5l-.94-.94L4.84 5.18z'/%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);
}

/* Dicas contextuais */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

    .form-text i {
        color: #0d6efd;
    }

/* ===== BOTÃO LIMPAR PESQUISA ===== */
.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

/* Navegação responsiva */
.navigation-buttons {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    margin-top: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .navigation-buttons .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

        .navigation-buttons .d-flex > div {
            text-align: center;
        }

        .navigation-buttons .d-flex .gap-2 {
            justify-content: center;
        }
}

/* Modal de limpeza */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-header.bg-warning {
    border-bottom: none;
}

/* Animação do ícone de vassoura */
@keyframes sweep {
    0%, 100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

.modal-body .fa-broom {
    animation: sweep 2s ease-in-out infinite;
}

/* Media Queries */
@media (max-width: 768px) {
    .rating-scale {
        gap: 0.25rem;
    }

    .rating-label {
        min-width: 60px;
        padding: 0.75rem 0.5rem;
    }

    .survey-container {
        margin: 1rem;
        border-radius: 15px;
    }
}

/* ===== FEEDBACK DE VALIDAÇÃO ===== */
.valid-feedback {
    display: block !important;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
}

.invalid-feedback {
    display: block !important;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Garantir que o feedback seja visível */
.form-control.is-valid ~ .valid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block !important;
}