/**
 * Calculadora Energética - Estilos Frontend
 * Versão: 1.0.0
 */

/* Reset e base */
.calculadora-energetica * {
    box-sizing: border-box;
}

.calculadora-energetica {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Header da calculadora */
.calc-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -20px -20px 30px -20px;
    position: relative;
}

.calc-header::before {
    content: '⚡';
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
    opacity: 0.9;
}

.calc-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calc-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
    line-height: 1.5;
}

/* Categorias de energia */
.calc-categorias {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

/* Responsivo para tablets */
@media (max-width: 768px) {
    .calc-categorias {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Responsivo para mobile */
@media (max-width: 480px) {
    .calc-categorias {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.categoria-item {
    text-align: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.categoria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.categoria-icon {
    font-size: 2em;
    margin-bottom: 8px;
    display: block;
}

.categoria-titulo {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 1em;
    line-height: 1.2;
}

.categoria-descricao {
    font-size: 0.8em;
    color: #6c757d;
    line-height: 1.3;
}

/* Barra de progresso */
.calc-progress {
    margin-bottom: 30px;
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-bottom: 10px;
    font-weight: 500;
    color: #495057;
}

/* Container das perguntas */
.calc-questions {
    min-height: 400px;
    position: relative;
}

.calc-question {
    display: none;
    animation: fadeIn 0.5s ease;
}

.calc-question.active {
    display: block;
}

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

/* Categoria badge */
.categoria-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categoria-badge.fisica {
    background: #d4edda;
    color: #155724;
}

.categoria-badge.mental {
    background: #cce5ff;
    color: #004085;
}

.categoria-badge.emocional {
    background: #f8d7da;
    color: #721c24;
}

.categoria-badge.espiritual {
    background: #fff3cd;
    color: #856404;
}

/* Pergunta */
.question-title {
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Opções de resposta */
.calc-options {
    display: grid;
    gap: 12px;
    margin-bottom: 30px;
}

.calc-option {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.calc-option-label {
    display: block;
    padding: 18px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    line-height: 1.4;
}

.calc-option-label:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateX(5px);
}

.calc-option input[type="radio"]:checked + .calc-option-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.calc-option-label::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
}

.calc-option input[type="radio"]:checked + .calc-option-label::before {
    background: white;
    border-color: white;
}

.calc-option input[type="radio"]:checked + .calc-option-label::after {
    content: '✓';
    position: absolute;
    right: 19px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-weight: bold;
    font-size: 14px;
}

/* Navegação */
.calc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.calc-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.calc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calc-btn-anterior {
    background: #6c757d;
    color: white;
}

.calc-btn-anterior:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.calc-btn-proximo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
}

.calc-btn-proximo:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Resultado */
.calc-resultado {
    display: none;
    text-align: center;
    padding: 40px 20px;
    animation: slideUp 0.6s ease;
}

.calc-resultado.show {
    display: block;
}

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

.resultado-score {
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.score-numero {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1;
}

.score-total {
    font-size: 1.2em;
    opacity: 0.8;
}

.resultado-titulo {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
}

.resultado-descricao {
    font-size: 1.1em;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Categorias no resultado */
.categorias-resultado {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.categoria-resultado-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.categoria-resultado-score {
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.categoria-resultado-nome {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

/* Recomendações */
.recomendacoes {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.recomendacoes h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.recomendacoes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recomendacoes li {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    padding-left: 30px;
}

.recomendacoes li:last-child {
    border-bottom: none;
}

.recomendacoes li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 10px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    margin: -20px -20px -20px -20px;
    margin-top: 30px;
}

.cta-section h4 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.email-capture {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.email-capture input[type="email"] {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    min-width: 200px;
}

.email-capture input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.email-capture button {
    padding: 15px 25px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.email-capture button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Widget */
.calc-widget {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.calc-widget p {
    margin-bottom: 15px;
    color: #6c757d;
}

.calc-widget-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.calc-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white !important;
}

/* Temas de cores */
.calculadora-energetica.tema-verde .calc-header {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.calculadora-energetica.tema-verde .calc-btn-proximo {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.calculadora-energetica.tema-verde .calc-option input[type="radio"]:checked + .calc-option-label {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border-color: #56ab2f;
}

.calculadora-energetica.tema-verde .score-circle {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.calculadora-energetica.tema-verde .cta-section {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.calculadora-energetica.tema-dourado .calc-header {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.calculadora-energetica.tema-dourado .calc-btn-proximo {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.calculadora-energetica.tema-dourado .calc-option input[type="radio"]:checked + .calc-option-label {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    border-color: #f7971e;
}

.calculadora-energetica.tema-dourado .score-circle {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.calculadora-energetica.tema-dourado .cta-section {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

/* Responsividade */
@media (max-width: 768px) {
    .calculadora-energetica {
        margin: 10px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .calc-header {
        padding: 30px 15px;
        margin: -15px -15px 20px -15px;
    }
    
    .calc-header h2 {
        font-size: 1.8em;
    }
    
    .calc-categorias {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .categoria-item {
        padding: 15px;
    }
    
    .question-title {
        font-size: 1.2em;
    }
    
    .calc-option-label {
        padding: 15px;
        font-size: 0.95em;
    }
    
    .calc-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .calc-btn {
        width: 100%;
        justify-content: center;
    }
    
    .calc-btn-proximo {
        margin-left: 0;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-numero {
        font-size: 2em;
    }
    
    .resultado-titulo {
        font-size: 1.6em;
    }
    
    .categorias-resultado {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .email-capture {
        flex-direction: column;
    }
    
    .email-capture input[type="email"],
    .email-capture button {
        width: 100%;
        min-width: auto;
    }
    
    .cta-section {
        padding: 30px 20px;
        margin: 20px -15px -15px -15px;
    }
}

@media (max-width: 480px) {
    .calc-header h2 {
        font-size: 1.5em;
    }
    
    .calc-header p {
        font-size: 1em;
    }
    
    .calc-categorias {
        grid-template-columns: 1fr;
    }
    
    .categorias-resultado {
        grid-template-columns: 1fr;
    }
    
    .recomendacoes {
        padding: 20px;
    }
}

/* Loading state */
.calc-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.calc-loading.show {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Acessibilidade */
.calc-option:focus-within .calc-option-label {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.calc-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .calc-navigation,
    .cta-section {
        display: none;
    }
    
    .calculadora-energetica {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

