/**
 * Estilos da Calculadora de Tamanho Ideal
 * Design moderno e responsivo
 */

/* Botão Principal */
.btn-calculadora-tamanho {
    display: inline-flex;
    align-items: center;
    background: #000;
    color: #fefefe;
    border: none;
    padding: 8px 15px;
    border-radius: 0px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

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

/* Modal */
.modal-calculadora-tamanho {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content-calculadora {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.btn-fechar-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-fechar-modal:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #2d3748;
    text-align: center;
}

/* Tabs */
.tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* Como Medir */
.como-medir-content {
    padding: 20px 0;
}

.img-como-medir {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.instrucoes-medidas h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2d3748;
}

.instrucao-item {
    margin-bottom: 20px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.instrucao-item strong {
    display: block;
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
}

.instrucao-item p {
    margin: 0;
    color: #4a5568;
    line-height: 1.6;
}

.alerta-instrucao {
    background: #fff3cd;
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.alerta-instrucao strong {
    display: block;
    color: #856404;
    margin-bottom: 12px;
    font-size: 15px;
}

.alerta-instrucao ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.alerta-instrucao li {
    margin-bottom: 8px;
}

/* Instruções Gerais e por Campo */
.instrucoes-gerais {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 8px;
}

.instrucoes-gerais p {
    margin: 0;
    color: #1565c0;
    line-height: 1.6;
}

.instrucao-campo {
    background: #f7fafc;
    border-left: 3px solid #667eea;
    padding: 12px 16px;
    margin-top: 8px;
    border-radius: 6px;
}

.instrucao-campo strong {
    display: block;
    color: #667eea;
    margin-bottom: 6px;
    font-size: 14px;
}

.instrucao-campo p {
    margin: 0;
    color: #4a5568;
    font-size: 13px;
    line-height: 1.5;
}

/* Formulário */
.form-medidas {
    padding: 20px 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #718096;
    font-size: 13px;
}

.btn-calcular {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Resultado */
#resultado-calculadora {
    padding: 20px 0;
}

.resultado-header {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 32px;
}

.tamanho-display {
    font-size: 72px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.resultado-header p {
    margin: 12px 0;
    font-size: 18px;
    opacity: 0.95;
}

.badge-confianca {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}

.badge-confianca.confianca-alta {
    background: rgba(76, 175, 80, 0.3);
}

.badge-confianca.confianca-media {
    background: rgba(255, 193, 7, 0.3);
}

.badge-confianca.confianca-baixa {
    background: rgba(244, 67, 54, 0.3);
}

/* Detalhes das Medidas */
.detalhes-medidas {
    margin-bottom: 24px;
}

.detalhes-medidas h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2d3748;
}

.medida-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f7fafc;
}

.medida-detail strong {
    color: #2d3748;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.medida-detail.status-perfeito {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.medida-detail.status-perfeito .status-badge {
    background: #28a745;
    color: white;
}

.medida-detail.status-proximo {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.medida-detail.status-proximo .status-badge {
    background: #17a2b8;
    color: white;
}

.medida-detail.status-apertado,
.medida-detail.status-folgado {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.medida-detail.status-apertado .status-badge,
.medida-detail.status-folgado .status-badge {
    background: #ffc107;
    color: #2d3748;
}

/* Avisos */
.avisos-container {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.aviso-item {
    color: #856404;
    margin-bottom: 8px;
    line-height: 1.6;
}

.aviso-item:last-child {
    margin-bottom: 0;
}

/* Ações */
.acoes-resultado {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-refazer,
.btn-adicionar-carrinho {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-refazer {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-refazer:hover {
    background: #cbd5e0;
}

.btn-adicionar-carrinho {
    background: #48bb78;
    color: white;
}

.btn-adicionar-carrinho:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    .modal-content-calculadora {
        padding: 24px;
        max-height: 95vh;
    }

    .modal-title {
        font-size: 24px;
    }

    .tamanho-display {
        font-size: 56px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 10px 12px;
    }

    .acoes-resultado {
        flex-direction: column;
    }

    .btn-refazer,
    .btn-adicionar-carrinho {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-calculadora-tamanho {
        padding: 0;
        align-items: flex-start;
    }

    .modal-content-calculadora {
        border-radius: 0;
        max-height: 100vh;
        min-height: 100vh;
    }

    .tamanho-display {
        font-size: 48px;
    }
}

/* Animações de carregamento */
.calculando {
    opacity: 0.6;
    pointer-events: none;
}

.calculando::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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