/* Estilos adicionais para a Calculadora CMM */

/* Estilos para formulário */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.form-col {
    flex: 1;
}

/* Estilos para tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #007AFF;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.4;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-mobile-active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Estilos para a área administrativa */
.admin-container {
    max-width: 100%;
    width: 100%;
}

.admin-form .form-group {
    width: 100%;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select {
    width: 100%;
}

/* Estilos para tabelas administrativas */
.admin-container .table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.admin-container .table th,
.admin-container .table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.admin-container .table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

.admin-container .table th:first-child,
.admin-container .table td:first-child {
    width: 20%;
    text-align: left;
}

.admin-container .table th:last-child,
.admin-container .table td:last-child {
    width: 15%;
}

/* Estilos para os resultados */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.result-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

/* Estilos para tabela de resultados */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.result-table th, 
.result-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.result-table th:first-child, 
.result-table td:first-child {
    text-align: left;
    width: 60%;
}

.result-table th:last-child, 
.result-table td:last-child {
    text-align: right;
    width: 40%;
}

.result-table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

.cmm-box {
    background-color: #e6f7ff;
    border: 2px solid #007AFF;
}

.cmm-value {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    color: #007AFF;
    margin: 20px 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.result-label {
    flex: 3;
}

.result-value {
    flex: 2;
    text-align: right;
    font-weight: 500;
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .results-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-container .table {
        font-size: 14px;
    }
    
    .admin-container .table th,
    .admin-container .table td {
        padding: 6px 4px;
    }
}
