/* Estilos para o sistema de orçamentos v2 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background-color: #2980b9;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 0;
}

.header h4 {
    font-size: 1.2rem;
    font-weight: normal;
    margin-top: 5px;
}

.logo {
    max-height: 80px;
}

.form-container, .result-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.process-group {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #f8f9fa;
}

.process-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2980b9;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.required-field::after {
    content: " *";
    color: #dc3545;
}

.form-label {
    font-weight: 500;
}

.btn-primary {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-primary:hover {
    background-color: #1c638e;
    border-color: #1c638e;
}

.footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 20px 0;
    margin-top: 30px;
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.footer p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Estilos para o resultado */
.table-result {
    width: 100%;
    border-collapse: collapse;
}

.table-result th {
    background-color: #2980b9;
    color: white;
    font-weight: 500;
    text-align: left;
    padding: 10px;
}

.table-result td {
    padding: 8px 10px;
    border-bottom: 1px solid #e9ecef;
}

.table-result tr:nth-child(even) {
    background-color: #f8f9fa;
}

.price-total {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2980b9;
}

/* Loading spinner */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    text-align: center;
    padding-top: 20%;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2980b9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Responsividade */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header h4 {
        font-size: 1rem;
    }
    
    .logo {
        max-height: 60px;
    }
    
    .form-container, .result-container {
        padding: 15px;
    }
    
    .process-group {
        padding: 15px;
    }
}

/* Estilos para campos inválidos */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Estilos para botões de ação no resultado */
.action-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.action-buttons .btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Estilos para tabelas de comparação */
.comparison-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.comparison-table th {
    background-color: #e9ecef;
    padding: 8px;
    text-align: left;
}

.comparison-table td {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

/* Destaque para valores importantes */
.highlight-value {
    font-weight: bold;
    color: #2980b9;
}

/* Estilos para seções de detalhes */
.details-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #2980b9;
}

.details-section h5 {
    color: #2980b9;
    margin-bottom: 10px;
}

/* ===== CARTA DE ORÇAMENTO ===== */
.carta-orcamento {
    background: #fff;
    border: 1px solid #ccc;
    padding: 30px 35px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #222;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.carta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #003366;
}

.carta-header-info p {
    margin: 2px 0;
    font-size: 13px;
}

.carta-header-logo img {
    height: 65px;
}

.carta-saudacao {
    margin-bottom: 18px;
}

.carta-saudacao p {
    margin: 4px 0;
}

.carta-numero {
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
}

.carta-item {
    border: 1px solid #aaa;
    border-radius: 3px;
    margin-bottom: 14px;
}

.carta-item-header {
    background: #f0f0f0;
    padding: 7px 14px;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 1px solid #aaa;
}

.carta-item-body {
    padding: 12px 16px;
    line-height: 1.6;
}

.carta-item-body p {
    margin: 3px 0;
}

.carta-item-total {
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding-top: 8px;
    font-size: 13.5px;
}

.carta-frete {
    padding: 10px 4px;
    font-size: 12px;
    color: #555;
}

.carta-rodape {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 14px;
    font-size: 11px;
}

.carta-rodape table {
    width: 100%;
    border-collapse: collapse;
}

.carta-rodape td {
    vertical-align: top;
    padding: 6px;
    width: 50%;
}

.carta-rodape td:first-child {
    color: #c00;
    font-size: 10.5px;
    line-height: 1.5;
}

.carta-rodape td:last-child {
    text-align: right;
}

.carta-assinatura {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
}

/* Disclaimer / Aviso de Simulação */
.disclaimer-simulacao {
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-left: 5px solid #ff9800;
    border-radius: 4px;
    padding: 14px 18px;
    margin: 16px 0;
    font-size: 13px;
    color: #5d4037;
}

.disclaimer-simulacao strong {
    color: #e65100;
}

/* Seção técnica (uso interno) */
.secao-tecnica {
    border: 1px dashed #aaa;
    border-radius: 4px;
    padding: 16px;
    margin-top: 10px;
    background: #f9f9f9;
}

.secao-tecnica-titulo {
    font-size: 13px;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 6px;
}
