/* Simulador de Mais-Valias - Frontend Styles */

/* Reset e Base */
.smv-simulador-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header */
.smv-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.smv-title {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.smv-subtitle {
    font-size: 1.1em;
    color: #7f8c8d;
    margin: 0;
    font-weight: 400;
}

/* Seções */
.smv-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #fafbfc;
    border-radius: 10px;
    border-left: 4px solid #3498DB;
}

.smv-section-title {
    display: flex;
    align-items: center;
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 25px 0;
}

.smv-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #3498DB;
    color: white;
    border-radius: 50%;
    font-size: 0.9em;
    font-weight: 700;
    margin-right: 12px;
}

/* Layout de Campos */
.smv-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.smv-field {
    margin-bottom: 20px;
}

.smv-field label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.smv-field .required {
    color: #e74c3c;
    font-weight: 700;
}

/* Inputs */
.smv-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.smv-input-group input {
    flex: 1;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.smv-input-group input:focus {
    outline: none;
    border-color: #3498DB;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.smv-currency {
    position: absolute;
    right: 15px;
    color: #7f8c8d;
    font-weight: 600;
    pointer-events: none;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #3498DB;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Radio Buttons */
.smv-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.smv-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #34495e;
}

.smv-radio input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: #3498DB;
}

/* Help Text */
.smv-help {
    display: block;
    color: #7f8c8d;
    font-size: 0.85em;
    margin-top: 5px;
    font-style: italic;
}

/* Botões */
.smv-actions {
    text-align: center;
    margin: 40px 0;
}

.smv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 200px;
}

.smv-btn-primary {
    background: #3498DB !important;
    color: #ffffff !important;
    border-color: #3498DB !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.smv-btn-primary:hover {
    background: #2980B9 !important;
    color: #ffffff !important;
    border-color: #2980B9 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.4);
}

.smv-btn-primary:active {
    transform: translateY(0);
}

.smv-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.smv-btn-loading {
    display: none;
}

.smv-btn.loading .smv-btn-text {
    display: none;
}

.smv-btn.loading .smv-btn-loading {
    display: inline;
}

/* Resultados */
.smv-results {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #28a745;
}

.smv-results-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #155724;
    margin: 0 0 25px 0;
    text-align: center;
}

.smv-result-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.smv-result-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.smv-result-header h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.smv-result-body {
    padding: 25px;
}

.smv-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.smv-result-row:last-child {
    border-bottom: none;
}

.smv-result-main {
    background: #f8f9fa;
    margin: -25px -25px 20px -25px;
    padding: 20px 25px;
    border-bottom: 2px solid #e9ecef;
}

.smv-result-label {
    font-weight: 600;
    color: #495057;
}

.smv-result-value {
    font-weight: 700;
    color: #212529;
    font-size: 1.1em;
}

.smv-result-tax {
    font-size: 1.4em;
    color: #28a745;
}

.smv-result-details {
    margin-top: 15px;
}

/* Erro */
.smv-error {
    margin-top: 20px;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.smv-error-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Disclaimer */
.smv-disclaimer {
    margin-top: 40px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.smv-disclaimer h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 1.1em;
}

.smv-disclaimer p {
    margin: 0;
    color: #856404;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Responsividade */
@media (max-width: 768px) {
    .smv-simulador-container {
        margin: 10px;
        padding: 15px;
    }
    
    .smv-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .smv-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .smv-title {
        font-size: 1.8em;
    }
    
    .smv-section {
        padding: 20px 15px;
    }
    
    .smv-result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .smv-result-value {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .smv-simulador-container {
        margin: 5px;
        padding: 10px;
    }
    
    .smv-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .smv-section {
        padding: 15px 10px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smv-results,
.smv-error {
    animation: fadeIn 0.5s ease-out;
}

/* Estados de Loading */
.smv-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Melhorias de Acessibilidade */
.smv-field input:focus,
.smv-field select:focus {
    outline: 2px solid #3498DB;
    outline-offset: 2px;
}

.smv-radio input:focus {
    outline: 2px solid #3498DB;
    outline-offset: 2px;
}

/* Validação */
.smv-field.error input,
.smv-field.error select {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.smv-field.error .smv-help {
    color: #e74c3c;
    font-weight: 600;
}