/* ==========================================================================
   Tipografía Gubernamental GobCL
   ========================================================================== */
@font-face {
    font-family: 'GobCL';
    src: url('https://cdn.digital.gob.cl/css/fonts/gobCL_Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'GobCL';
    src: url('https://cdn.digital.gob.cl/css/fonts/gobCL_Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

/* ==========================================================================
   Contenedor Principal y Aislamiento (Scope)
   ========================================================================== */
#bc-plugin-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
}

#bc-plugin-wrapper * {
    font-family: 'GobCL', sans-serif, system-ui !important;
    box-sizing: border-box !important;
}

/* Utilitarios Básicos */
#bc-plugin-wrapper .d-none { display: none !important; }

/* Colores Oficiales */
#bc-plugin-wrapper .text-agencia-primary { color: #00495F !important; }
#bc-plugin-wrapper .bg-agencia-primary   { background: #00495F !important; }
#bc-plugin-wrapper .text-agencia-line      { color: #E84A2D !important; }
#bc-plugin-wrapper .bg-agencia-line        { background: #E84A2D !important; }

/* Iconos SVG */
#bc-plugin-wrapper svg {
    display: inline-block;
    vertical-align: middle;
}
#bc-plugin-wrapper .bc-icon-sm { width: 16px !important; height: 16px !important; }
#bc-plugin-wrapper .bc-icon-md { width: 22px !important; height: 22px !important; }
#bc-plugin-wrapper .bc-icon-xl { width: 48px !important; height: 48px !important; }

/* Tarjeta Principal */
#bc-plugin-wrapper .bc-search-card {
    background: #00495F !important;
    border-radius: 12px !important;
    padding: 24px !important;
    width: 100% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

#bc-plugin-wrapper .bc-title {
    color: #ffffff !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* Input de Búsqueda */
#bc-plugin-wrapper .bc-search-box {
    position: relative !important;
    margin-bottom: 16px !important;
    width: 100% !important;
}

#bc-plugin-wrapper .bc-search-input-group {
    position: relative !important;
    width: 100% !important;
}

#bc-plugin-wrapper .bc-search-icon {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    pointer-events: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

#bc-plugin-wrapper .bc-custom-input {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    padding: 12px 16px 12px 48px !important;
    width: 100% !important;
    box-shadow: none !important;
}

#bc-plugin-wrapper .bc-custom-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

#bc-plugin-wrapper .bc-custom-input:focus {
    background: #ffffff !important;
    color: #1a202c !important;
    outline: none !important;
}

/* ==========================================================================
   Dropdown de Sugerencias (Autocompletado Diseñado a Medida)
   ========================================================================== */
#bc-plugin-wrapper .bc-suggestions-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 6px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18) !important;
    max-height: 320px !important;
    overflow-y: auto !important;
    z-index: 999 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}

/* Cada ítem dentro del Autocompletado */
#bc-plugin-wrapper .bc-suggestion-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

#bc-plugin-wrapper .bc-suggestion-item:last-child {
    border-bottom: none !important;
}

#bc-plugin-wrapper .bc-suggestion-item:hover {
    background-color: #f8fafc !important;
}

#bc-plugin-wrapper .bc-suggestion-icon {
    margin-right: 14px !important;
    color: #00495F !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

#bc-plugin-wrapper .bc-suggestion-title {
    font-weight: 700 !important;
    color: #0f172a !important;
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    margin-bottom: 2px !important;
}

#bc-plugin-wrapper .bc-suggestion-sub {
    font-size: 0.8rem !important;
    color: #64748b !important;
}

#bc-plugin-wrapper .bc-suggestion-empty {
    padding: 16px !important;
    text-align: center !important;
    color: #64748b !important;
    font-size: 0.88rem !important;
}

/* ==========================================================================
   Botones de Acción (Flexbox Autónomo)
   ========================================================================== */
#bc-plugin-wrapper .bc-buttons-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    width: 100% !important;
    justify-content: center !important;
}

#bc-plugin-wrapper .bc-btn-col {
    flex: 1 1 280px !important;
    max-width: 100% !important;
}

#bc-plugin-wrapper .bc-btn-passive {
    background: #E9F0F9 !important;
    color: #00495F !important;
    border: 1px solid transparent !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    width: 100% !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

#bc-plugin-wrapper .bc-btn-passive:hover {
    background: #E84A2D !important;
    color: #ffffff !important;
}

#bc-plugin-wrapper .bc-btn-active {
    background: #003545 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    width: 100% !important;
    cursor: pointer !important;
    text-align: center !important;
}

/* Mensaje Informativo */
#bc-plugin-wrapper .bc-welcome-msg {
    text-align: center !important;
    padding: 12px 0 !important;
    margin-bottom: 16px !important;
}

#bc-plugin-wrapper .bc-welcome-msg p {
    color: #64748b !important;
    font-size: 0.88rem !important;
    margin: 0 !important;
}

/* ==========================================================================
   Tablas de Resultados
   ========================================================================== */
#bc-plugin-wrapper .bc-table-card {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
    border-top: none !important;
    width: 100% !important;
    overflow-x: auto !important;
}

#bc-plugin-wrapper .bc-table {
    margin-bottom: 0 !important;
    width: 100% !important;
    border-collapse: collapse !important;
}

#bc-plugin-wrapper .bc-table thead th {
    background: #f1f5f9 !important;
    color: #00495F !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    padding: 14px 12px !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

#bc-plugin-wrapper .bc-table tbody tr {
    border-bottom: 1px solid #f1f5f9 !important;
}

#bc-plugin-wrapper .bc-table tbody tr:nth-child(even) {
    background: #fafafa !important;
}

#bc-plugin-wrapper .bc-table tbody td {
    padding: 14px 12px !important;
    vertical-align: middle !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
}

/* Badges Experimental */
#bc-plugin-wrapper .bc-badge-exp-yes {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    display: inline-block;
}

#bc-plugin-wrapper .bc-badge-exp-no {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    display: inline-block;
}

/* Listas Punteadas en Módulos */
#bc-plugin-wrapper .bc-bullet-list {
    list-style-type: disc !important;
    margin: 0 !important;
    padding-left: 1rem !important;
    text-align: left !important;
}

#bc-plugin-wrapper .bc-bullet-list li {
    margin-bottom: 3px !important;
    line-height: 1.35 !important;
    font-size: 0.82rem !important;
}

#bc-plugin-wrapper .bc-bullet-list li:last-child {
    margin-bottom: 0 !important;
}
/* Área de Resultados y Tarjeta Header de Colegio */
#bc-plugin-wrapper .bc-results-area {
    margin-top: 20px !important;
    width: 100% !important;
}

#bc-plugin-wrapper .bc-result-header-card {
    background: #ffffff !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 20px 24px !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom: 3px solid #E84A2D !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

#bc-plugin-wrapper .bc-result-header-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}

#bc-plugin-wrapper .bc-result-header-title h2 {
    color: #00495F !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

#bc-plugin-wrapper .bc-result-header-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    color: #64748b !important;
    font-size: 0.88rem !important;
}

#bc-plugin-wrapper .bc-result-header-meta strong {
    color: #0f172a !important;
}

/* Filas destacadas de Impulso Lector */
#bc-plugin-wrapper .bc-tr-impulso {
    background-color: #E3F6FD !important;
}

/* Tarjeta informativa sin datos / redirección */
#bc-plugin-wrapper .bc-info-card {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    padding: 40px 20px !important;
    text-align: center !important;
    border: 1px solid #e2e8f0 !important;
    border-top: none !important;
}

#bc-plugin-wrapper .bc-info-title {
    color: #0f172a !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
}

#bc-plugin-wrapper .bc-info-desc {
    color: #64748b !important;
    font-size: 0.9rem !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

#bc-plugin-wrapper .bc-btn-redirect {
    display: inline-block !important;
    background: #E84A2D !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(232, 74, 45, 0.25) !important;
}

#bc-plugin-wrapper .bc-btn-redirect:hover {
    background: #c83b21 !important;
    color: #ffffff !important;
}

/* Color Celeste Oficial para las celdas de Impulso Lector */
#bc-plugin-wrapper .bc-table tr.bc-tr-impulso,
#bc-plugin-wrapper .bc-table tr.bc-tr-impulso td {
    background-color: #E3F6FD !important;
}