/* Centro de Ayuda (BetterDocs): /soporte-y-ayuda/, categorías y artículos.
 * Se carga solo en las páginas de BetterDocs, que llevan la clase tc-docs en <body> (functions.php).
 * Reemplaza los colores del plugin por la paleta de Tecreamos.cl. No cambia la configuración de BetterDocs. */

body.tc-docs {
	--td-petroleo: #0F2830;
	--td-rojo: var(--tc-rojo, #D71920);
	--td-rojo-claro: #FDEEEF;
	--td-pastel: #EEF4F2;
	--td-texto: #34404C;
	--td-gris: #5B6673;
	--td-borde: #E1E8EE;
	--td-fondo: #F4F7F9;
	--td-linea: #EEF2F5;
	background: var(--td-fondo);
}

/* ── Ancho completo, sin marco alrededor ── */
body.tc-docs #page.grid-container { max-width: none !important; margin: 0 !important; padding: 0 !important; background: var(--td-fondo) !important; }
body.tc-docs #content.site-content { display: block !important; padding: 0 !important; }
body.tc-docs .betterdocs-wrapper { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: var(--td-fondo) !important; }
body.tc-docs .betterdocs-wrapper .betterdocs-content-wrapper { box-sizing: border-box; width: 100% !important; max-width: calc(var(--tc-ancho, 1180px) + 48px) !important; margin: 0 auto !important; padding: 56px 24px 80px !important; background: transparent !important; }

/* ── Franja del buscador ── */
body.tc-docs .betterdocs-search-form-wrapper { box-sizing: border-box; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 64px 24px 72px !important; background: var(--td-petroleo) !important; background-image: none !important; border-radius: 0 !important; }
body.tc-docs .betterdocs-search-heading { width: 100% !important; margin: 0 auto 26px !important; text-align: center; }
body.tc-docs .betterdocs-search-heading::before { content: "CENTRO DE AYUDA"; display: block; margin-bottom: 14px; font-family: var(--tc-fuente-titulos); font-size: 13px; font-weight: 600; letter-spacing: .14em; color: #FF5A5F; }
body.tc-docs .betterdocs-search-heading .heading { margin: 0 !important; font-family: var(--tc-fuente-titulos) !important; font-size: 44px !important; font-weight: 600 !important; line-height: 1.15 !important; letter-spacing: -.02em !important; color: #ffffff !important; }
body.tc-docs .betterdocs-search-heading .subheading { margin: 12px 0 0 !important; font-family: var(--tc-fuente) !important; font-size: 16px !important; font-weight: 400 !important; color: rgba(255, 255, 255, .78) !important; }
body.tc-docs .betterdocs-search-form-wrapper .betterdocs-searchform { box-sizing: border-box; width: 100% !important; max-width: 680px !important; margin: 0 auto !important; padding: 4px 18px !important; background: #ffffff !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important; }
body.tc-docs .betterdocs-search-form-wrapper .betterdocs-searchform-input-wrap { background: transparent !important; border: 0 !important; }
body.tc-docs .betterdocs-search-form-wrapper .betterdocs-searchform-input-wrap svg { color: var(--td-petroleo); fill: currentColor; }
body.tc-docs .betterdocs-search-form-wrapper .betterdocs-search-field { height: 52px !important; font-family: var(--tc-fuente) !important; font-size: 15px !important; color: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-search-form-wrapper .betterdocs-search-field::placeholder { color: var(--td-gris) !important; opacity: 1; }

/* ── Categorías del inicio: tarjetas en dos columnas ── */
body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-category-grid-inner-wrapper { display: block !important; height: auto !important; column-count: 2; column-gap: 22px; }
body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-category-grid-inner-wrapper > .betterdocs-single-category-wrapper { position: static !important; top: auto !important; left: auto !important; display: inline-block !important; width: 100% !important; margin: 0 0 22px !important; transform: none !important; break-inside: avoid; }
body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-single-category-inner { display: block !important; height: auto !important; padding: 24px 26px 18px !important; background: #ffffff !important; border: 1px solid var(--td-borde) !important; border-radius: 16px !important; box-shadow: 0 4px 12px rgba(15, 23, 42, .07); }
body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-category-header { width: 100% !important; margin: 0 0 12px !important; padding: 0 0 16px !important; border-bottom: 2px solid var(--td-rojo) !important; }
body.tc-docs .betterdocs-category-header .betterdocs-category-header-inner { display: flex !important; align-items: center !important; gap: 14px; margin: 0 !important; padding: 0 !important; border: 0 !important; }

/* Ícono de carpeta en gris oscuro sobre fondo pastel */
body.tc-docs .betterdocs-category-icon { position: relative; display: flex !important; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px !important; height: 44px !important; margin: 0 !important; background: var(--td-pastel); border-radius: 12px; }
body.tc-docs .betterdocs-category-icon::after { content: none !important; display: none !important; }
body.tc-docs .betterdocs-category-icon img, body.tc-docs .betterdocs-category-icon .betterdocs-folder-icon { display: none !important; }
body.tc-docs .betterdocs-category-icon::before {
	content: ""; width: 20px; height: 20px; background: #333333;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 6a2 2 0 0 1 2-2h4.2l2 2H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 6a2 2 0 0 1 2-2h4.2l2 2H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.tc-docs .betterdocs-category-title { flex: 1 1 0%; min-width: 0; margin: 0 !important; padding: 0 !important; font-family: var(--tc-fuente-titulos) !important; font-size: 20px !important; font-weight: 600 !important; line-height: 1.3 !important; text-align: left !important; text-transform: none !important; color: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-category-items-counts { display: flex !important; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 32px; width: auto !important; height: 32px !important; padding: 0 8px !important; background: var(--td-petroleo) !important; border: 0 !important; border-radius: 999px !important; }
body.tc-docs .betterdocs-category-items-counts span { display: inline !important; width: auto !important; height: auto !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; font-family: var(--tc-fuente) !important; font-size: 13px !important; font-weight: 700 !important; line-height: 1 !important; color: #ffffff !important; }

/* Lista de artículos */
body.tc-docs .betterdocs-articles-list { margin: 0 !important; padding: 0 !important; list-style: none !important; }
body.tc-docs .betterdocs-articles-list li { display: flex !important; align-items: flex-start !important; gap: 10px; width: auto !important; height: auto !important; margin: 0 !important; padding: 8px 0 !important; border-bottom: 1px solid var(--td-linea); }
body.tc-docs .betterdocs-articles-list li:last-child { border-bottom: 0; }
body.tc-docs .betterdocs-articles-list li > svg { flex: 0 0 16px; width: 16px !important; height: 16px !important; margin-top: 3px; }
body.tc-docs .betterdocs-articles-list li > svg path, body.tc-docs .betterdocs-articles-list li > svg g { fill: var(--td-gris) !important; }
body.tc-docs .betterdocs-articles-list li a { width: auto !important; height: auto !important; font-family: var(--tc-fuente) !important; font-size: 14.5px !important; line-height: 1.55 !important; text-decoration: none !important; color: var(--td-petroleo) !important; transition: color .2s; }
body.tc-docs .betterdocs-articles-list li a:hover, body.tc-docs .betterdocs-articles-list li a.active { color: var(--td-rojo) !important; }

/* ── Categorías y artículos: barra lateral + contenido ── */
body.tc-docs .betterdocs-single-wrapper .betterdocs-content-wrapper, body.tc-docs .betterdocs-taxonomy-wrapper .betterdocs-content-wrapper { display: flex !important; align-items: flex-start !important; gap: 34px !important; }
body.tc-docs .betterdocs-sidebar { border: 0 !important; background: transparent !important; }
@media (min-width: 768px) {
	body.tc-docs .betterdocs-sidebar { flex: 0 0 290px !important; width: 290px !important; max-width: 290px !important; }
}
body.tc-docs .betterdocs-sidebar .betterdocs-sidebar-content { position: static !important; max-height: none !important; overflow: visible !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-sidebar-content::before, body.tc-docs .betterdocs-sidebar .betterdocs-sidebar-content::after,
body.tc-docs .betterdocs-sidebar .betterdocs-category-grid-inner-wrapper::before, body.tc-docs .betterdocs-sidebar .betterdocs-category-grid-inner-wrapper::after,
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper::before, body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper::after,
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-inner::before, body.tc-docs .betterdocs-sidebar .betterdocs-single-category-inner::after,
body.tc-docs .betterdocs-sidebar .betterdocs-category-header::before, body.tc-docs .betterdocs-sidebar .betterdocs-category-header::after,
body.tc-docs .betterdocs-sidebar .betterdocs-body::before, body.tc-docs .betterdocs-sidebar .betterdocs-body::after,
body.tc-docs .betterdocs-sidebar .betterdocs-articles-list::before, body.tc-docs .betterdocs-sidebar .betterdocs-articles-list::after,
body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li::before, body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li::after,
body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li a::before, body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li a::after { content: none !important; display: none !important; }

/* Tabla de contenidos de la barra lateral */
body.tc-docs .betterdocs-sidebar .sticky-toc-container { margin-top: 16px !important; }
body.tc-docs .betterdocs-toc { padding: 16px 18px !important; background: #ffffff !important; border: 1px solid var(--td-borde) !important; border-radius: 12px !important; box-shadow: none !important; }
body.tc-docs .betterdocs-toc .toc-title { font-family: var(--tc-fuente-titulos) !important; font-size: 15px !important; font-weight: 600 !important; color: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-toc a { font-family: var(--tc-fuente) !important; font-size: 13.5px !important; color: var(--td-texto) !important; }
body.tc-docs .betterdocs-toc a:hover, body.tc-docs .betterdocs-toc a.active { color: var(--td-rojo) !important; }

/* Buscador de la barra lateral */
body.tc-docs .betterdocs-search-modal-sidebar, body.tc-docs .betterdocs-sidebar-search { width: 100% !important; min-height: 0 !important; margin: 0 0 16px !important; padding: 0 !important; background: transparent !important; }
body.tc-docs .betterdocs-search-modal-sidebar .search-bar, body.tc-docs .betterdocs-search-modal-sidebar .search-input-wrapper { width: 100% !important; max-width: none !important; margin: 0 !important; background: #ffffff !important; border-color: var(--td-borde) !important; border-radius: 10px !important; }
body.tc-docs .betterdocs-sidebar-search .betterdocs-searchform { box-sizing: border-box; display: flex !important; align-items: center !important; gap: 10px; width: 100% !important; margin: 0 !important; padding: 12px 14px !important; background: #ffffff !important; border: 1px solid var(--td-borde) !important; border-radius: 12px !important; box-shadow: none !important; cursor: text; }
body.tc-docs .betterdocs-sidebar-search .betterdocs-searchform-input-wrap { display: flex !important; flex: 1 1 0%; align-items: center !important; gap: 10px; min-width: 0; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; }
body.tc-docs .betterdocs-sidebar-search .betterdocs-searchform-input-wrap svg { position: static !important; flex: 0 0 18px; width: 18px !important; height: 18px !important; margin: 0 !important; color: var(--td-petroleo); }
body.tc-docs .betterdocs-sidebar-search .betterdocs-search-command { overflow: hidden; padding: 0 !important; white-space: nowrap; text-overflow: ellipsis; font-family: var(--tc-fuente) !important; font-size: 14px !important; line-height: 1.3 !important; color: var(--td-gris) !important; }
body.tc-docs .betterdocs-sidebar-search .command-key { flex: 0 0 auto; padding: 3px 7px !important; background: var(--td-fondo) !important; border: 1px solid var(--td-borde) !important; border-radius: 6px !important; font-size: 11px !important; line-height: 1.2 !important; color: var(--td-gris) !important; }

/* Tarjetas de categoría de la barra lateral */
body.tc-docs .betterdocs-sidebar .betterdocs-category-grid-inner-wrapper { display: flex !important; flex-direction: column; gap: 8px; height: auto !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper { position: static !important; width: 100% !important; margin: 0 !important; transform: none !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-inner { display: block !important; overflow: hidden; height: auto !important; padding: 0 !important; background: #ffffff !important; border: 1px solid var(--td-borde) !important; border-radius: 12px !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-header { width: 100% !important; margin: 0 !important; padding: 11px 12px !important; background: transparent !important; border: 0 !important; cursor: pointer; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-icon { flex-basis: 34px; width: 34px !important; height: 34px !important; border-radius: 10px; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-icon::before { width: 16px; height: 16px; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-title { font-size: 14.5px !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-items-counts { min-width: 26px; height: 26px !important; padding: 0 6px !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-items-counts span { font-size: 11.5px !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-category-header svg:not(.betterdocs-category-icon svg) { color: var(--td-gris); fill: currentColor; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-header { background: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-title { color: #ffffff !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-icon { background: rgba(255, 255, 255, .12); }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-icon::before { background: #ffffff; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-items-counts { background: var(--td-rojo) !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-single-category-wrapper.active .betterdocs-category-header svg { color: #ffffff; }
body.tc-docs .betterdocs-sidebar .betterdocs-body { padding: 6px 14px 10px !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li { padding: 2px 0 !important; border: 0 !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li a { display: block !important; padding: 6px 10px !important; border-radius: 8px !important; background: transparent !important; font-size: 13.5px !important; line-height: 1.45 !important; }
body.tc-docs .betterdocs-sidebar .betterdocs-articles-list li a.active { background: var(--td-rojo-claro) !important; color: var(--td-rojo) !important; font-weight: 600; }

/* ── Contenido del artículo ── */
body.tc-docs .betterdocs-content-area { flex: 1 1 auto !important; min-width: 0; max-width: none !important; }
body.tc-docs .betterdocs-single-wrapper .betterdocs-content-area,
body.tc-docs .betterdocs-taxonomy-wrapper .betterdocs-content-area,
body.tc-docs .betterdocs-content-inner-area { padding: 34px 38px 40px !important; background: #ffffff !important; border: 1px solid var(--td-borde) !important; border-radius: 16px !important; box-shadow: 0 4px 12px rgba(15, 23, 42, .07); }
body.tc-docs .betterdocs-breadcrumb { margin: 0 0 16px !important; }
body.tc-docs .betterdocs-breadcrumb, body.tc-docs .betterdocs-breadcrumb a, body.tc-docs .betterdocs-breadcrumb span { font-family: var(--tc-fuente) !important; font-size: 13px !important; color: var(--td-gris) !important; }
body.tc-docs .betterdocs-breadcrumb a:hover { color: var(--td-rojo) !important; }
body.tc-docs .betterdocs-breadcrumb svg { fill: var(--td-gris) !important; }
body.tc-docs .betterdocs-entry-title, body.tc-docs .betterdocs-main-category-folder .betterdocs-category-title { font-family: var(--tc-fuente-titulos) !important; font-size: 32px !important; font-weight: 600 !important; line-height: 1.2 !important; letter-spacing: -.01em !important; text-transform: none !important; color: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-content { font-family: var(--tc-fuente) !important; font-size: 16px !important; line-height: 1.75 !important; color: var(--td-texto) !important; }
body.tc-docs .betterdocs-content h2, body.tc-docs .betterdocs-content h3, body.tc-docs .betterdocs-content h4 { font-family: var(--tc-fuente-titulos) !important; font-weight: 600 !important; color: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-content a { color: var(--td-rojo) !important; }
body.tc-docs .betterdocs-content img { max-width: 100%; height: auto; border-radius: 8px; }
body.tc-docs .betterdocs-title-excerpt-list { padding: 14px 0 !important; border-bottom: 1px solid var(--td-linea) !important; }
body.tc-docs .betterdocs-title-excerpt-list .betterdocs-entry-title { display: flex; align-items: flex-start; gap: 10px; margin: 0 !important; font-size: 17px !important; letter-spacing: 0 !important; }
body.tc-docs .betterdocs-title-excerpt-list .betterdocs-entry-title a { text-decoration: none !important; color: var(--td-petroleo) !important; }
body.tc-docs .betterdocs-title-excerpt-list .betterdocs-entry-title a:hover { color: var(--td-rojo) !important; }
body.tc-docs .betterdocs-title-excerpt-list svg path { fill: var(--td-gris) !important; }

/* ── Responsive ── */
@media (min-width: 1025px) and (max-width: 1440px) {
	body.tc-docs .betterdocs-sidebar { flex-basis: 260px !important; width: 260px !important; max-width: 260px !important; }
}
@media (max-width: 1024px) {
	body.tc-docs .betterdocs-search-heading .heading { font-size: 36px !important; }
	body.tc-docs .betterdocs-wrapper .betterdocs-content-wrapper { padding: 44px 24px 64px !important; gap: 24px !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	body.tc-docs .betterdocs-sidebar { flex-basis: 250px !important; width: 250px !important; max-width: 250px !important; }
}
@media (max-width: 767px) {
	body.tc-docs .betterdocs-search-form-wrapper { padding: 46px 18px 52px !important; }
	body.tc-docs .betterdocs-search-heading .heading { font-size: 29px !important; }
	body.tc-docs .betterdocs-search-heading .subheading { font-size: 14px !important; }
	body.tc-docs .betterdocs-wrapper .betterdocs-content-wrapper { padding: 28px 16px 50px !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-content-wrapper { padding: 22px 12px 44px !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-category-grid-inner-wrapper { column-count: 1; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-single-category-wrapper { margin-bottom: 14px !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-single-category-inner { padding: 16px 14px 8px !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-category-header { margin-bottom: 4px !important; padding-bottom: 12px !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-body { margin: 0 !important; padding: 0 !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-articles-list li { gap: 8px; padding: 9px 0 !important; }
	body.tc-docs .betterdocs-docs-archive-wrapper .betterdocs-articles-list li a { font-size: 14px !important; }
	body.tc-docs .betterdocs-category-title { font-size: 18px !important; }
	body.tc-docs .betterdocs-single-wrapper .betterdocs-content-wrapper, body.tc-docs .betterdocs-taxonomy-wrapper .betterdocs-content-wrapper { display: block !important; }
	body.tc-docs .betterdocs-sidebar { margin-bottom: 20px; }
	body.tc-docs .betterdocs-single-wrapper .betterdocs-content-area,
body.tc-docs .betterdocs-taxonomy-wrapper .betterdocs-content-area,
body.tc-docs .betterdocs-content-inner-area { padding: 22px 18px 26px !important; }
	body.tc-docs .betterdocs-entry-title, body.tc-docs .betterdocs-main-category-folder .betterdocs-category-title { font-size: 25px !important; }
}
@media (max-width: 380px) {
	body.tc-docs .betterdocs-search-heading .heading { font-size: 26px !important; }
	body.tc-docs .betterdocs-wrapper .betterdocs-content-wrapper { padding: 24px 12px 44px !important; }
}
