/* Ajustes para layout com header no formulário */
.simulator-section {
    padding-top: 2rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--muted-foreground);
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Tela de Carregamento */
.loading-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    transition: all 0.5s ease-in-out;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-container {
    text-align: center;
    max-width: 500px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--primary);
    animation: spin 1.2s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--primary);
    animation: spin 0.9s linear infinite;
}

.loading-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.loading-subtitle {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.loading-progress {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ff7a3d);
    border-radius: 4px;
    animation: progress-fill 2s ease-in-out forwards;
}

@keyframes progress-fill {
    0% { width: 0%; }
    100% { width: 100%; }
}

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

/* Responsividade do Loading */
@media (max-width: 768px) {
    .loading-spinner {
        width: 100px;
        height: 100px;
        margin: 0 auto 1.5rem;
    }
    
    .loading-title {
        font-size: 1.5rem;
    }
    
    .loading-subtitle {
        font-size: 1rem;
    }
    
    .loading-container {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .loading-spinner {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
    }
    
    .spinner-ring {
        border-width: 3px;
        border-top-width: 3px;
    }
    
    .loading-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .loading-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .loading-container {
        padding: 1rem;
    }
    
    .progress-bar {
        height: 6px;
    }
}

/* Transições suaves entre seções */
.simulator-section,
.loading-section,
.results-section {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.simulator-section.hidden,
.loading-section.hidden,
.results-section.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.simulator-section,
.loading-section,
.results-section {
    opacity: 1;
    transform: translateY(0);
}

/* Card Principal de Resultados */
.results-main-card {
    background: #f8f4f4;
    border: 1px solid #E0E0E0;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    min-height: 120px;
}

/* Seção do Título */
.results-title-section {
    flex: 0 0 auto;
    min-width: 200px;
}

.results-main-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

/* Seção dos Dados */
.results-data-section {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 4rem;
    align-items: center;
}

.data-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.data-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.data-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Seção da Ação */
.results-action-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* Responsividade */
@media (max-width: 1024px) {
    .results-data-section {
        gap: 2.5rem;
    }
    
    .data-value {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .results-main-card {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    
    .results-title-section {
        min-width: auto;
    }
    
    .results-main-title {
        font-size: 1.5rem;
    }
    
    .results-data-section {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }
    
    .data-item {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(252, 84, 4, 0.1);
    }
    
    .data-item:last-child {
        border-bottom: none;
    }
    
    .data-value {
        font-size: 1.1rem;
    }
    
    .data-label {
        font-size: 0.7rem;
    }
    
    .results-action-section {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

.new-simulation-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(252, 84, 4, 0.3);
}

.new-simulation-btn:hover {
    background: #e64a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 84, 4, 0.4);
}

.new-simulation-btn svg {
    transition: transform 0.3s ease;
}

.new-simulation-btn:hover svg {
    transform: translateX(-3px);
}
