/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container principal */
.calc-grau-container {
    max-width: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background: #fff;
}

/* Header - mais compacto */
.calc-grau-header {
    text-align: center;
    margin-bottom: 16px;
}

.calc-grau-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

/* Main content */
.calc-grau-main {
    width: 100%;
}

/* Seção do botão converter - redesenhada */
.calc-grau-converter-section {
    text-align: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calc-grau-btn-converter {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 240px;
}

.calc-grau-btn-converter:hover {
    background: #2980b9;
}

/* Modal - redesenhado mais clean */
.calc-grau-conversion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
}

.calc-grau-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.calc-grau-modal-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-grau-modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.calc-grau-close-modal {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.calc-grau-close-modal:hover {
    background: #f8f9fa;
    color: #495057;
}

.calc-grau-modal-body {
    padding: 16px 20px;
}

.calc-grau-modal-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Grupos de olhos - mais compactos */
.calc-grau-eye-group {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calc-grau-eye-title {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
}

.calc-grau-eye-subtitle {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Layout de campos - grid responsivo */
.calc-grau-row,
.calc-grau-row-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

/* Modal sem quantidade - 3 colunas */
.calc-grau-row-modal {
    grid-template-columns: repeat(3, 1fr);
}

.calc-grau-field {
    display: flex;
    flex-direction: column;
}

.calc-grau-label {
    font-size: 10px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Selects - design mais clean */
.calc-grau-select {
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    color: #495057;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 6px center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 24px;
}

.calc-grau-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.calc-grau-select:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Checkbox - design mais moderno */
.calc-grau-same-grade {
    text-align: right;
    margin-bottom: 16px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.calc-grau-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: #495057;
    font-weight: 500;
    
}

.calc-grau-checkbox {
    margin-right: 6px;
    width: 14px;
    height: 14px;
    accent-color: #3498db;
    all: revert-layer;
}

/* Botões - design mais clean */
.calc-grau-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 80px;
}

.calc-grau-btn-primary {
    background: #3498db;
    color: white;
}

.calc-grau-btn-primary:hover {
    background: #2980b9;
}

.calc-grau-btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.calc-grau-btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
}

/* Ações */
.calc-grau-actions {
    text-align: center;
    margin-top: 16px;
}

/* Seções principais - mais compactas */
.calc-grau-input-section,
.calc-grau-conversion-section {
    margin-bottom: 16px;
}

.calc-grau-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    text-align: center;
}

/* Resultado */
.calc-grau-result {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.calc-grau-result-title {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.calc-grau-result-content {
    font-size: 11px;
    line-height: 1.4;
    color: #6c757d;
}

/* Converted eyes */
.calc-grau-converted-eye {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

/* Responsividade */
@media (max-width: 480px) {
    .calc-grau-container {
        font-size: 13px;
    }
    
    .calc-grau-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .calc-grau-row,
    .calc-grau-row-modal {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .calc-grau-modal-header {
        padding: 12px 16px 8px;
    }
    
    .calc-grau-modal-body {
        padding: 12px 16px;
    }
    
    .calc-grau-modal-footer {
        padding: 8px 16px 12px;
        flex-direction: column;
    }
    
    .calc-grau-btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .calc-grau-row,
    .calc-grau-row-modal {
        grid-template-columns: 1fr;
    }
}

.pageProduct-additionalMessage{
    display: none !important;
}

/* Estilos para interface customizada de esférico */
.calc-grau-esferico-wrapper {
    position: relative;
    width: 100%;
}

.calc-grau-esferico-btn {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    color: #495057;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 6px center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 24px;
}

.calc-grau-esferico-btn:hover,
.calc-grau-esferico-btn:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
    outline: none;
}

.calc-grau-esferico-btn.selected {
    color: #2c3e50;
    font-weight: 500;
}

.calc-grau-esferico-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    /* overflow-y: auto; */
    display: none;
}

.calc-grau-esferico-dropdown.open {
    display: flex;
}

.calc-grau-section-left,
.calc-grau-section-right {
    flex: 1;
    padding: 8px;
}

.calc-grau-section-left {
    border-right: 1px solid #e9ecef;
}

.calc-grau-section-title {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 0;
    margin-bottom: 4px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 3px;
    color: #495057;
}

/* Cores apenas para os sinais + e - */
.calc-grau-minus {
    color: #dc3545 !important; /* Vermelho para menos */
    font-weight: bold;
}

.calc-grau-plus {
    color: #28a745 !important; /* Verde para mais */
    font-weight: bold;
}

.calc-grau-options-list {
    max-height: 200px;
    overflow-y: auto;
}

.calc-grau-option {
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.calc-grau-option:hover {
    background-color: #f8f9fa;
}

.calc-grau-option:active {
    background-color: #e9ecef;
}

.pageProduct-fieldsAdditional{
    display: none !important;
}
        