/* TypeForm Custom Styles */

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Classes de animação */
.animate-slide-in {
    animation: slideIn 0.3s ease-out forwards;
}

.animate-slide-out {
    animation: slideOut 0.3s ease-out forwards;
}

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

/* Questões e campos */
.question-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    display: block;
}

.question-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Input Fields */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 0.25rem;
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s;
    min-height: 120px;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Radio e Checkbox Options */
.option-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #fff;
}

.option-label:hover {
    border-color: #4f46e5;
    background-color: #f9fafb;
}

.option-label.selected {
    border-color: #4f46e5;
    background-color: #eef2ff;
}

.option-input {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.option-text {
    flex: 1;
    font-size: 1rem;
    color: #1f2937;
}

/* Dropdown */
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Rating Stars */
.rating-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem;
}

.rating-star {
    font-size: 2.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
}

.rating-star:hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating-star.active {
    color: #fbbf24;
}

/* Yes/No Buttons */
.yes-no-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.yes-no-btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.yes-no-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.yes-no-btn.selected-yes {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

.yes-no-btn.selected-no {
    background-color: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* File Upload */
.file-upload-container {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background-color: #f9fafb;
}

.file-upload-container:hover {
    border-color: #4f46e5;
    background-color: #eef2ff;
}

.file-upload-container.dragover {
    border-color: #4f46e5;
    background-color: #eef2ff;
}

.file-upload-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.file-upload-text {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: #9ca3af;
}

.file-upload-input {
    display: none;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

.uploaded-file-name {
    color: #1f2937;
    font-weight: 500;
}

.uploaded-file-remove {
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}

.uploaded-file-remove:hover {
    transform: scale(1.1);
}

/* Required indicator */
.required-indicator {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Progress indicator for questions */
.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: #4f46e5;
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Date picker styling */
.form-date {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: #fff;
    transition: all 0.2s;
}

.form-date:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Phone input with mask */
.phone-input {
    letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .question-label {
        font-size: 1.125rem;
    }
    
    .rating-star {
        font-size: 2rem;
    }
    
    .yes-no-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-width: 100px;
    }
}

/* Loading states */
.skeleton {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Accessibility focus styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Navegador de Perguntas */
#nav-dropdown {
    animation: slideDown 0.2s ease-out;
}

#nav-dropdown.hidden {
    animation: none;
}

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

/* Progress Dots Mini-map */
#progress-dots button {
    transition: all 0.2s ease;
}

#progress-dots button:hover {
    transform: scale(1.8);
}

#progress-dots button.ring-2 {
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Dropdown Navigation Items */
.nav-question-item {
    transition: all 0.2s ease;
}

.nav-question-item:hover {
    transform: translateX(4px);
}