/* =============================================================
   configuraciones.css — Sectores Industriales Selector
   ============================================================= */

/* Wrapper panel */
.sectors-wrapper {
    padding: 4px 0;
}

#panel-info .cv-info-col:first-of-type > .cv-form-group {
    grid-column: 1 / -1 !important;
}

#panel-info .cv-form-label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

/* Estilos de la nota basados en Figma */
.nota-informativa {
    /* Layout & Dimensiones */
    display: flex;
    flex-direction: row;
    /* Flow: Horizontal */
    align-items: center;
    width: 798px;
    /* Width: Fixed (798px) */
    height: 54px;
    /* Height: Fixed (54px) */
    box-sizing: border-box;

    /* Posicionamiento absoluto opcional (descomentar si lo requieres fijo en pantalla) */
    /* position: absolute; top: 357px; left: 282px; */

    /* Estilos Visuales */
    background-color: #356AAB;
    /* Background color */
    border-radius: 8px;
    /* Radius */

    /* Padding (Top, Right, Bottom, Left) */
    padding: 15px 742px 15px 32px;
    /* Nota: El padding derecho de 742px en Figma suele ser un "relleno" automático de autolayout. 
         Si el texto es largo, es mejor cambiarlo a 'padding-right: 32px;' para que no se desborde. */

    /* Espacio entre el icono y el texto */
    gap: 10px;
    /* Gap: 10px */
}

/* Contenedor del Icono */
.nota-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #FFFFFF;
    /* Fondo blanco del círculo */
    border-radius: 50%;
    flex-shrink: 0;
    /* Evita que el círculo se deforme */
}

.nota-icono svg {
    width: 14px;
    height: 14px;
    fill: #356AAB;
    /* El icono toma el color azul de fondo */
}

/* Estilos del Texto */
.nota-texto {
    color: #FFFFFF;
    /* Color de selección blanco */
    font-family: poppins;
    font-size: 13px;
    /* Ajustado visualmente para que quepa en los 54px de alto */
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
    /* Mantiene el texto en una sola línea como en la imagen */
}


/* Instruction text */
.sectors-instruction {
    font-size: 13px;
    color: #374151;
    margin-bottom: 10px;
}

/* Search icon inside the container */
.sectors-search-icon {
    font-size: 18px;
    color: #9ca3af;
    flex-shrink: 0;
    pointer-events: none;
}

/* Chips wrapper */
.sectors-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Toggle expand button */
.sectors-toggle-btn {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 2px;
    transition: transform 0.2s ease;
}

.sectors-toggle-btn.open {
    transform: rotate(180deg);
}

/* Subsectors label */
.subsectors-label {
    font-size: 13px;
    color: #374151;
    margin-bottom: 4px;
}

/* Container for the search and selection tags */
.sectors-select-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #fff;
    min-height: 42px;
    position: relative;
    cursor: text;
    overflow: visible;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sectors-select-container:focus-within {
    border-color: #1b4e6b;
    box-shadow: 0 0 0 3px rgba(27, 78, 107, 0.1);
}

/* Inner search input */
.sectors-search-input {
    border: none;
    background: transparent;
    outline: none;
    flex-grow: 1;
    font-size: 13px;
    font-family: var(--font-base);
    color: #111827;
    min-width: 120px;
    padding: 4px 0;
}

/* Selected Sector Tag / Chip */
.sector-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e0ebff;
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 0.15s;
}

@media (min-width: 768px) {
    .sector-chip {
        font-size: 14px;
    }
}

.chip-category-agricultura,
.chip-category-default {
    background: #e5f0ff;
    color: #374151;
}

.chip-category-energia {
    background: #ffe4e6;
    color: #374151;
}

.chip-category-profesionales {
    background: #ffedd5;
    color: #374151;
}

.sector-chip__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: #2563eb;
    cursor: pointer;
    font-size: 10px;
    transition: background-color 0.15s, color 0.15s;
}

.sector-chip__close:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.sector-chip-remove {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    padding: 0;
}

.sector-chip-remove span {
    font-size: 0 !important;
}

.sector-chip-remove span::before {
    content: 'x';
    font-size: 16px;
    font-weight: 700;
}

/* Dropdown list popup */
.sectors-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 380px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.sectors-dropdown.show {
    display: block;
}

/* Dropdown options */
.sectors-dropdown-item {
    padding: 10px 14px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s ease;
    border-right: 4px solid transparent;
}

.sectors-dropdown-item:hover {
    background-color: #f3f4f6;
}

.sectors-dropdown-item.selected {
    background-color: #eff6ff;
    color: #1b4e6b;
    font-weight: 500;
    border-right-color: #3b82f6;
}

.sectors-dropdown-item--add {
    gap: 12px;
}

.sectors-dropdown-add-label {
    align-items: center;
    background: #eaf1fb;
    border-radius: 6px;
    color: #1b4e6b;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
}

.sectors-dropdown-item--add:hover .sectors-dropdown-add-label,
.sectors-dropdown-item--add.selected .sectors-dropdown-add-label {
    background: #1b4e6b;
    color: #fff;
}

.selected-sector-group {
    margin-bottom: 24px;
    width: 100%;
}

.selected-sector-group__title {
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
}

.selected-sector-group__chips {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Subsectors grid styling */
.subsectors-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px;
    margin-top: 16px;
}

@media (min-width: 640px) {
    .subsectors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .subsectors-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.subsector-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subsector-column-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin-bottom: 8px;
}

.subsector-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Custom premium checkboxes */
.subsector-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    user-select: none;
    line-height: 1.4;
}

.subsector-item input[type="checkbox"] {
    display: none;
    /* Hide standard browser checkbox */
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: #fff;
    transition: background-color 0.15s, border-color 0.15s;
    margin-top: 2px;
}

.subsector-item:hover .custom-checkbox {
    border-color: #94a3b8;
}

.subsector-item input[type="checkbox"]:checked+.custom-checkbox {
    background-color: #111827;
    border-color: #111827;
}

.subsector-item input[type="checkbox"]:checked+.custom-checkbox::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* "Todas las categorías" special representation (no borders, just checkmark when active) */
.subsector-item.all-categories input[type="checkbox"]:checked+.custom-checkbox {
    background-color: transparent;
    border-color: transparent;
}

.subsector-item.all-categories input[type="checkbox"]:checked+.custom-checkbox::after {
    border-color: #111827;
    width: 5px;
    height: 10px;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

/* Horizontal rule divider styling */
.sectors-divider {
    border: 0;
    height: 1px;
    background-color: #e5e7eb;
    margin: 24px 0;
}

/* Warning message when max selected */
.sectors-warning {
    font-size: 12px;
    color: #dc2626;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}
