/* Estilos para o modal de valores */
#valoresModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.modal-header h2 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.valores-search-bar {
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.search-container {
    flex: 1;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-container .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.btn-atualizar {
    padding: 8px;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.btn-atualizar:hover {
    background: #e5e5e5;
}

.valores-content {
    flex: 1;
    overflow: hidden;
    display: flex;
}

/* Abas */
.tabs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 16px;
}

.tab-btn.active {
    color: #2196F3;
    border-bottom: 2px solid #2196F3;
    background: white;
}

.tab-content {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Configurações */
.config-section {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.section-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.section-content {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.input-with-visual {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-range-visual {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.range-track {
    height: 100%;
    width: 100%;
    position: relative;
}

.range-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #2196F3;
    transition: width 0.3s ease;
}

/* Cores */
.cores-section {
    margin-top: 30px;
}

.cores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.cor-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.cor-header {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cor-valor {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cor-valor input[type="number"] {
    width: 80px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
}

/* Perfis, Acessórios e Vidros */
.aumento-massa {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.aumento-massa input[type="number"] {
    width: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
}

.aumento-massa label {
    font-weight: 500;
    color: #333;
}

.modelo-section,
.categoria-section,
.tipo-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.perfis-grid,
.acessorios-grid,
.vidros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 15px;
}

.perfil-item,
.acessorio-item,
.vidro-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.perfil-item:hover,
.acessorio-item:hover,
.vidro-item:hover {
    border-color: #2196F3;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.1);
}

.perfil-item label,
.acessorio-item label,
.vidro-item label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.valor-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    width: 100%;
}

.valor-container input[type="number"] {
    flex: 1;
    min-width: 120px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}

.valor-container input[type="number"]:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.valor-metro,
.valor-acessorio,
.valor-vidro,
.unidade {
    min-width: 80px;
    color: #2196F3;
    font-size: 12px;
    font-weight: 500;
    text-align: right;
}

.unidade {
    color: #666;
    font-weight: normal;
}




/* Seções colapsáveis */
.section-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
}

.section-header:hover {
    background-color: #f8f9fa;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.toggle-icon {
    transition: transform 0.3s ease;
    color: #666;
    font-size: 14px;
}

.section-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.section-content.collapsed {
    display: none;
}

/* Animação suave para colapso */
.section-content {
    max-height: none;
    opacity: 1;
}

.section-content.collapsing {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Melhorias visuais para as seções */
.modelo-section .section-header,
.categoria-section .section-header,
.tipo-section .section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.modelo-section .section-header:hover,
.categoria-section .section-header:hover,
.tipo-section .section-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Cores diferentes para diferentes tipos de seção */
.modelo-section .section-header h3 {
    color: #2196F3;
}

.categoria-section .section-header h3 {
    color: #4CAF50;
}

.tipo-section .section-header h3 {
    color: #FF9800;
}

/* Botões do rodapé */
.modal-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Animações */
@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(33,150,243,0.1); }
    100% { background-color: transparent; }
}

.highlight {
    animation: highlight 1s ease;
}

/* Headers das abas */
.perfis-header,
.acessorios-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
}

/* Botões de adicionar novo item */
.adicionar-perfil,
.adicionar-acessorio {
    display: flex;
    align-items: center;
}

.btn-add-perfil,
.btn-add-acessorio {
    background: #28a745;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-add-perfil:hover,
.btn-add-acessorio:hover {
    background: #218838;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-add-perfil:active,
.btn-add-acessorio:active {
    transform: scale(0.95);
}

/* Modal de adicionar item */
.modal-add-item {
    max-width: 500px;
}

.modal-add-item .modal-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
}

.modal-add-item .modal-header .header-icon {
    font-size: 24px;
    margin-right: 10px;
}

.modal-add-item .form-group {
    margin-bottom: 20px;
}

.modal-add-item label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.modal-add-item input,
.modal-add-item select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-add-item input:focus,
.modal-add-item select:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.valor-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.valor-input-container input {
    flex: 1;
}

.unidade-label {
    color: #666;
    font-size: 14px;
    min-width: 30px;
}

.modal-add-item .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.modal-add-item .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.modal-add-item .btn-secondary:hover {
    background: #5a6268;
}

.modal-add-item .btn-blue {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.modal-add-item .btn-blue:hover {
    background: #0056b3;
}

/* Badge para itens customizados */
.badge-customizado {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
}

/* Responsividade */
@media (max-width: 768px) {
    .perfis-grid,
    .acessorios-grid,
    .vidros-grid,
    .cores-grid {
        grid-template-columns: 1fr;
    }

    .valor-container input[type="number"] {
        min-width: 100px;
    }

    .aumento-massa {
        flex-direction: column;
        align-items: stretch;
    }

    .aumento-massa input[type="number"] {
        width: 100%;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .perfis-header,
    .acessorios-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .adicionar-perfil,
    .adicionar-acessorio {
        justify-content: center;
    }
} 