/* ==========================================================================
   Compositum sobre Bootstrap 5.3.8 — capa permanente
   --------------------------------------------------------------------------
   La plantilla Canvas (style.css, responsive.css, custom-style.css…) se
   escribió sobre Bootstrap 3 y da por hechos sus valores base. Este fichero
   se carga JUSTO DESPUÉS de bootstrap.min.css y ANTES de style.css, en el
   mismo sitio que ocupaba bootstrap.css 3.4.1, y devuelve a los componentes
   de Bootstrap 5 el aspecto que tenían con Bootstrap 3. Así Canvas los sigue
   sobrescribiendo igual que antes y la web se ve igual.

   Es permanente: describe el aspecto de Compositum con clases de Bootstrap 5.
   Las plantillas ya no usan clases de Bootstrap 3 (tools/bs5/migrar.py
   --comprobar templates/web): no se añaden aquí.

   Puntos de corte: Bootstrap 3 usaba xs <768, sm ≥768, md ≥992, lg ≥1200.
   Bootstrap 5 los desplaza (sm ≥576, md ≥768, lg ≥992, xl ≥1200), así que
   al migrar una plantilla col-sm-* pasa a col-md-*, col-md-* a col-lg-* y
   col-lg-* a col-xl-* (lo hace tools/bs5/migrar.py). Los anchos de
   .container siguen siendo los de Bootstrap 3 (750 / 970 / 1170 px).
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Base: lo que el «reboot» de Bootstrap 5 cambia respecto a Bootstrap 3
   -------------------------------------------------------------------------- */

/* Bootstrap 5 activa el desplazamiento suave en toda la página; Canvas anima
   el «volver arriba» con jQuery y Bootstrap 3 no lo tenía */
:root { scroll-behavior: auto; }

html { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

/* Bootstrap 5 usa «bolder», que sobre el peso 300 de Canvas da 400, no negrita */
b,
strong { font-weight: bold; }

small,
.small { font-size: 85%; }

mark,
.mark {
	padding: .2em;
	background-color: #fcf8e3;
}

hr {
	height: 0;
	margin-top: 20px;
	margin-bottom: 20px;
	color: inherit;
	border: 0;
	border-top: 1px solid #eee;
	opacity: 1;
	box-sizing: content-box;
}

label {
	max-width: 100%;
	margin-bottom: 5px;
	font-weight: bold;
}

legend {
	float: none;
	display: block;
	width: 100%;
	padding: 0;
	margin-bottom: 20px;
	font-size: 21px;
	line-height: inherit;
	color: #333;
	border: 0;
	border-bottom: 1px solid #e5e5e5;
}

legend + * { clear: none; }

/* Bootstrap 5 quita el redondeo nativo de los botones */
button { border-radius: revert; }

/* Bootstrap 3 (normalize) hacía heredar color y toda la fuente; Bootstrap 5
   solo familia, tamaño e interlineado (el peso 300 de Canvas se perdía) */
button,
input,
optgroup,
select,
textarea {
	color: inherit;
	font: inherit;
}

input[type="radio"],
input[type="checkbox"] {
	margin: 4px 0 0;
	line-height: normal;
}

input[type="search"] {
	-webkit-appearance: none;
	box-sizing: border-box;
}

input[type="file"] { display: block; }

input[type="range"] { display: block; width: 100%; }

select[multiple],
select[size] { height: auto; }

textarea {
	overflow: auto;
	resize: both;
}

optgroup { font-weight: bold; }

/* Bootstrap 5 quita el relleno de las partes de los campos de fecha */
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field { padding: revert; }

::-webkit-datetime-edit {
	display: revert;
	padding: revert;
}

button[disabled],
input[disabled] { cursor: default; }

output {
	display: block;
	padding-top: 7px;
	font-size: 14px;
	line-height: 1.42857143;
	color: #555;
}

h1 small, h2 small, h3 small, h4 small, h5 small, h6 small,
h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small {
	font-weight: normal;
	line-height: 1;
	color: #777;
}

h1 small, h2 small, h3 small,
h1 .small, h2 .small, h3 .small { font-size: 65%; }

h4 small, h5 small, h6 small,
h4 .small, h5 .small, h6 .small { font-size: 75%; }

address {
	margin-bottom: 20px;
	line-height: 1.42857143;
}

dt,
dd { line-height: 1.42857143; }

dd { margin-bottom: 0; }

blockquote {
	padding: 10px 20px;
	margin: 0 0 20px;
	font-size: 17.5px;
	border-left: 5px solid #eee;
}

blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child { margin-bottom: 0; }

blockquote footer,
blockquote small,
blockquote .small {
	display: block;
	font-size: 80%;
	line-height: 1.42857143;
	color: #777;
}

blockquote footer:before,
blockquote small:before,
blockquote .small:before { content: "\2014 \00A0"; }

code {
	padding: 2px 4px;
	font-size: 90%;
	color: #c7254e;
	background-color: #f9f2f4;
	border-radius: 4px;
}

pre {
	display: block;
	padding: 9.5px;
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.42857143;
	color: #333;
	word-break: break-all;
	word-wrap: break-word;
	background-color: #f5f5f5;
	border: 1px solid #ccc;
	border-radius: 4px;
}

pre code {
	padding: 0;
	font-size: inherit;
	color: inherit;
	white-space: pre-wrap;
	background-color: transparent;
	border-radius: 0;
}

caption {
	padding-top: 8px;
	padding-bottom: 8px;
	color: #777;
	text-align: left;
}

th { text-align: left; }

/* El «clearfix» de Bootstrap 3 también tenía :before, que impide que el
   margen superior del primer hijo se salga del contenedor. Canvas cuenta con
   ello en todos los .container */
.clearfix:before,
.clearfix:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after {
	display: table;
	content: " ";
}

.clearfix:after,
.container:after,
.container-fluid:after { clear: both; }

.lead {
	margin-bottom: 20px;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.4;
}

@media (min-width: 768px) {
	.lead { font-size: 21px; }
}

/* Colores de texto de Bootstrap 3 */
.text-muted { color: #777 !important; }
.text-primary { color: #337ab7 !important; }
.text-success { color: #3c763d !important; }
.text-info { color: #31708f !important; }
.text-warning { color: #8a6d3b !important; }
.text-danger { color: #a94442 !important; }

/* Canvas oculta elementos con la clase «hide» (pestañas adaptables de functions.js) */
.hide { display: none !important; }

/* Menú móvil de Canvas: functions.js alterna la clase «show» en la lista del
   menú, y Bootstrap 3 la mostraba con .show { display: block !important } */
#primary-menu > ul.show,
#primary-menu > div > ul.show { display: block !important; }


/* --------------------------------------------------------------------------
   2. Rejilla: medianiles de 30 px y anchos de contenedor de Bootstrap 3
   -------------------------------------------------------------------------- */

.container,
.container-fluid,
.row { --bs-gutter-x: 30px; }

.container { max-width: none; }

@media (min-width: 768px) {
	.container { max-width: 750px; }
}

@media (min-width: 992px) {
	.container { max-width: 970px; }
}

@media (min-width: 1200px) {
	.container { max-width: 1170px; }
}

/* Una fila de Bootstrap 5 es flex, y sus columnas no comparten márgenes. En
   Bootstrap 3, cuando las columnas ocupaban todo el ancho (el móvil, casi
   siempre) eran bloques normales y los márgenes de su contenido se juntaban.
   Para que el móvil mida lo mismo, la fila se comporta como un bloque en los
   tamaños en que ninguna de sus columnas tiene ancho propio. */
@media (max-width: 575.98px) {
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"])) { display: block; }

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"]))::before,
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"]))::after {
		display: table;
		content: " ";
	}

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"]))::after { clear: both; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"])) { display: block; }

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"]))::before,
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"]))::after {
		display: table;
		content: " ";
	}

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"]))::after { clear: both; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"])) { display: block; }

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"]))::before,
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"]))::after {
		display: table;
		content: " ";
	}

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"]))::after { clear: both; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"])) { display: block; }

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"]))::before,
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"]))::after {
		display: table;
		content: " ";
	}

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"]))::after { clear: both; }
}

@media (min-width: 1200px) {
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"], > [class*="col-xl-"], > [class*="col-xxl-"])) { display: block; }

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"], > [class*="col-xl-"], > [class*="col-xxl-"]))::before,
	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"], > [class*="col-xl-"], > [class*="col-xxl-"]))::after {
		display: table;
		content: " ";
	}

	.row:not([class*="row-cols-"]):not(:has(> .col, > .col-1, > .col-2, > .col-3, > .col-4, > .col-5, > .col-6, > .col-7, > .col-8, > .col-9, > .col-10, > .col-11, > .col-12, > .col-auto, > [class*="col-xs-"], > [class*="col-sm-"], > [class*="col-md-"], > [class*="col-lg-"], > [class*="col-xl-"], > [class*="col-xxl-"]))::after { clear: both; }
}

/* Las columnas de Bootstrap 3 eran position: relative (Canvas sitúa cosas
   dentro con position: absolute) */
.row > [class*="col-"],
.row > .col { position: relative; min-height: 1px; }

/* Bootstrap 5 da ancho completo y medianil a todo hijo de .row (.row > *);
   Bootstrap 3 solo a las columnas. Un enlace o un texto puesto directamente
   en una fila (p. ej. «Ver pedidos» en el carrito) conserva su tamaño.
   Con :where() pesa lo mismo que la regla de Bootstrap: la anula, pero no a
   Canvas (style.css va después), que da márgenes y rellenos a .line, .button… */
.row > :where(:not([class*="col"])) { flex-shrink: 1; width: auto; max-width: none; padding-right: 0; padding-left: 0; margin-top: 0; }


/* --------------------------------------------------------------------------
   3. Botones
   -------------------------------------------------------------------------- */

.btn {
	--bs-btn-padding-x: 12px;
	--bs-btn-padding-y: 6px;
	--bs-btn-font-family: inherit;
	--bs-btn-font-size: 14px;
	--bs-btn-font-weight: normal;
	--bs-btn-line-height: 1.42857143;
	--bs-btn-border-radius: 4px;
	--bs-btn-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
	--bs-btn-focus-box-shadow: none;
	--bs-btn-disabled-opacity: .65;
	white-space: nowrap;
	touch-action: manipulation;
	transition: none;
}

/* Sombra al pulsar, como en Bootstrap 3 (no al tener el desplegable abierto) */
.btn:first-child:active,
.btn.active,
:not(.btn-check) + .btn:active {
	box-shadow: var(--bs-btn-box-shadow);
}

.btn-lg,
.btn-group-lg > .btn {
	--bs-btn-padding-y: 10px;
	--bs-btn-padding-x: 16px;
	--bs-btn-font-size: 18px;
	--bs-btn-border-radius: 6px;
	line-height: 1.3333333;
}

.btn-sm,
.btn-group-sm > .btn {
	--bs-btn-padding-y: 5px;
	--bs-btn-padding-x: 10px;
	--bs-btn-font-size: 12px;
	--bs-btn-border-radius: 3px;
	line-height: 1.5;
}

/* btn-secondary es el antiguo btn-default de Bootstrap 3 */
.btn-secondary {
	--bs-btn-color: #333;
	--bs-btn-bg: #fff;
	--bs-btn-border-color: #ccc;
	--bs-btn-hover-color: #333;
	--bs-btn-hover-bg: #e6e6e6;
	--bs-btn-hover-border-color: #adadad;
	--bs-btn-active-color: #333;
	--bs-btn-active-bg: #e6e6e6;
	--bs-btn-active-border-color: #adadad;
	--bs-btn-disabled-color: #333;
	--bs-btn-disabled-bg: #fff;
	--bs-btn-disabled-border-color: #ccc;
}

/* Pulsado o abierto y con el foco o el ratón encima, Bootstrap 3 lo oscurecía un poco más */
.btn-secondary.show:hover,
.btn-secondary.show:focus,
.btn-secondary.active:hover,
.btn-secondary.active:focus,
.btn-secondary:active:hover,
.btn-secondary:active:focus {
	background-color: #d4d4d4;
	border-color: #8c8c8c;
}

.btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: #337ab7;
	--bs-btn-border-color: #2e6da4;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #286090;
	--bs-btn-hover-border-color: #204d74;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #286090;
	--bs-btn-active-border-color: #204d74;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #337ab7;
	--bs-btn-disabled-border-color: #2e6da4;
}

.btn-success {
	--bs-btn-color: #fff;
	--bs-btn-bg: #5cb85c;
	--bs-btn-border-color: #4cae4c;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #449d44;
	--bs-btn-hover-border-color: #398439;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #449d44;
	--bs-btn-active-border-color: #398439;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #5cb85c;
	--bs-btn-disabled-border-color: #4cae4c;
}

.btn-info {
	--bs-btn-color: #fff;
	--bs-btn-bg: #5bc0de;
	--bs-btn-border-color: #46b8da;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #31b0d5;
	--bs-btn-hover-border-color: #269abc;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #31b0d5;
	--bs-btn-active-border-color: #269abc;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #5bc0de;
	--bs-btn-disabled-border-color: #46b8da;
}

.btn-warning {
	--bs-btn-color: #fff;
	--bs-btn-bg: #f0ad4e;
	--bs-btn-border-color: #eea236;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #ec971f;
	--bs-btn-hover-border-color: #d58512;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #ec971f;
	--bs-btn-active-border-color: #d58512;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #f0ad4e;
	--bs-btn-disabled-border-color: #eea236;
}

.btn-danger {
	--bs-btn-color: #fff;
	--bs-btn-bg: #d9534f;
	--bs-btn-border-color: #d43f3a;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #c9302c;
	--bs-btn-hover-border-color: #ac2925;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #c9302c;
	--bs-btn-active-border-color: #ac2925;
	--bs-btn-disabled-color: #fff;
	--bs-btn-disabled-bg: #d9534f;
	--bs-btn-disabled-border-color: #d43f3a;
}

/* Canvas pinta los btn-link del color de la marca */
.btn-link {
	--bs-btn-color: #d0112b;
	--bs-btn-hover-color: #222;
	--bs-btn-active-color: #222;
	--bs-btn-disabled-color: #777;
	--bs-btn-box-shadow: none;
	text-decoration: none;
	border-radius: 0;
}

.btn-link:hover,
.btn-link:focus { text-decoration: underline; }

/* Bootstrap 5 añade un triángulo a todos los desplegables; en Compositum cada
   desplegable lleva su propio icono */
.dropdown-toggle::after { content: none; }


/* --------------------------------------------------------------------------
   4. Formularios
   -------------------------------------------------------------------------- */

.form-control {
	height: 34px;
	padding: 6px 12px;
	font-size: 14px;
	font-weight: inherit;
	line-height: 1.42857143;
	color: #555;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

.form-control:focus {
	color: #555;
	background-color: #fff;
	border-color: #66afe9;
	outline: 0;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
}

.form-control::placeholder { color: #999; opacity: 1; }

.form-control:disabled,
.form-control[readonly] {
	background-color: #eee;
	opacity: 1;
}

.form-control:disabled { cursor: not-allowed; }

textarea.form-control,
select[multiple].form-control,
select[size].form-control { height: auto; }

.form-control-sm {
	height: 30px;
	padding: 5px 10px;
	font-size: 12px;
	line-height: 1.5;
	border-radius: 3px;
}

.form-control-lg {
	height: 46px;
	padding: 10px 16px;
	font-size: 18px;
	line-height: 1.3333333;
	border-radius: 6px;
}

/* Bootstrap 3 dejaba la flecha nativa en select.form-control */
select.form-control { appearance: auto; }

.form-label { font-weight: bold; margin-bottom: 5px; }

/* Bootstrap 5 ya no tiene form-group; se conserva como clase propia */
.form-group { margin-bottom: 15px; }

/* El antiguo help-block */
.form-text {
	display: block;
	margin-top: 5px;
	margin-bottom: 10px;
	font-size: inherit;
	color: #737373;
}

.input-group > .form-control { height: 34px; }

/* El antiguo input-group-addon */
.input-group-text {
	padding: 6px 12px;
	font-size: 14px;
	font-weight: normal;
	line-height: 1;
	color: #555;
	background-color: #eee;
	border: 1px solid #ccc;
	border-radius: 4px;
}


/* --------------------------------------------------------------------------
   5. Desplegables
   -------------------------------------------------------------------------- */

.dropdown-menu {
	--bs-dropdown-min-width: 160px;
	--bs-dropdown-padding-y: 5px;
	--bs-dropdown-spacer: 2px;
	--bs-dropdown-font-size: 14px;
	--bs-dropdown-color: #333;
	--bs-dropdown-bg: #fff;
	--bs-dropdown-border-color: rgba(0, 0, 0, .15);
	--bs-dropdown-border-radius: 4px;
	--bs-dropdown-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
	--bs-dropdown-divider-bg: #e5e5e5;
	--bs-dropdown-divider-margin-y: 9px;
	--bs-dropdown-link-color: #333;
	--bs-dropdown-link-hover-color: #262626;
	--bs-dropdown-link-hover-bg: #f5f5f5;
	--bs-dropdown-link-active-color: #fff;
	--bs-dropdown-link-active-bg: #337ab7;
	--bs-dropdown-link-disabled-color: #777;
	--bs-dropdown-item-padding-x: 20px;
	--bs-dropdown-item-padding-y: 3px;
	--bs-dropdown-header-color: #777;
	--bs-dropdown-header-padding-x: 20px;
	--bs-dropdown-header-padding-y: 3px;
	color: inherit;
	box-shadow: var(--bs-dropdown-box-shadow);
}

.dropdown-item { line-height: 1.42857143; }

/* El separador como <li class="dropdown-divider">: en el menú de Canvas los <li>
   flotan, y el antiguo li.divider ocupaba todo el ancho (Canvas tiene su propio
   .divider con width: 100%) */
.dropdown-menu > li.dropdown-divider { width: 100%; }

.dropdown-header { font-size: 12px; line-height: 1.42857143; }


/* --------------------------------------------------------------------------
   6. Tablas
   -------------------------------------------------------------------------- */

.table {
	--bs-table-color: inherit;
	--bs-table-bg: transparent;
	--bs-table-border-color: #ddd;
	--bs-table-striped-color: inherit;
	--bs-table-striped-bg: transparent;
	--bs-table-active-color: inherit;
	--bs-table-active-bg: transparent;
	--bs-table-hover-color: inherit;
	--bs-table-hover-bg: transparent;
	max-width: 100%;
	margin-bottom: 20px;
}

/* Bootstrap 5 fuerza el color de texto de las celdas; Bootstrap 3 lo heredaba */
.table > :not(caption) > * > * {
	padding: 8px;
	line-height: 1.42857143;
	color: inherit;
	border-top: 1px solid #ddd;
	border-bottom-width: 0;
	box-shadow: none;
}

.table > thead { vertical-align: bottom; }

.table > thead > tr > th { border-bottom: 2px solid #ddd; }

.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td { border-top: 0; }

.table > tbody + tbody { border-top: 2px solid #ddd; }

.table-group-divider { border-top: 2px solid #ddd; }

.table-sm > :not(caption) > * > * { padding: 5px; }

.table-bordered { border: 1px solid #ddd; }

.table-bordered > :not(caption) > * > * { border: 1px solid #ddd; }

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td { border-bottom-width: 2px; }

.table-striped > tbody > tr:nth-of-type(odd) { background-color: #f9f9f9; }

.table-hover > tbody > tr:hover { background-color: #f5f5f5; }

.table-active,
.table-active > td,
.table-active > th { background-color: #f5f5f5; }

.table-success,
.table-success > td,
.table-success > th { background-color: #dff0d8; }

.table-info,
.table-info > td,
.table-info > th { background-color: #d9edf7; }

.table-warning,
.table-warning > td,
.table-warning > th { background-color: #fcf8e3; }

.table-danger,
.table-danger > td,
.table-danger > th { background-color: #f2dede; }

.table-responsive { min-height: .01%; }

@media screen and (max-width: 767px) {
	.table-responsive {
		width: 100%;
		margin-bottom: 15px;
		overflow-y: hidden;
		border: 1px solid #ddd;
	}

	.table-responsive > .table { margin-bottom: 0; }

	.table-responsive > .table > :not(caption) > * > * { white-space: nowrap; }

	.table-responsive > .table-bordered { border: 0; }
}


/* --------------------------------------------------------------------------
   7. Paginación, migas, listas, insignias y bocadillos
   -------------------------------------------------------------------------- */

/* En Bootstrap 3 la paginación era inline-block (se centra con text-center) */
.pagination {
	--bs-pagination-padding-x: 12px;
	--bs-pagination-padding-y: 6px;
	--bs-pagination-font-size: inherit;
	--bs-pagination-color: #d0112b;
	--bs-pagination-bg: #fff;
	--bs-pagination-border-color: #ddd;
	--bs-pagination-border-radius: 4px;
	--bs-pagination-hover-color: #d0112b;
	--bs-pagination-hover-bg: #eee;
	--bs-pagination-hover-border-color: #ddd;
	--bs-pagination-focus-color: #d0112b;
	--bs-pagination-focus-bg: #eee;
	--bs-pagination-focus-box-shadow: none;
	--bs-pagination-active-color: #fff;
	--bs-pagination-active-bg: #d0112b;
	--bs-pagination-active-border-color: #d0112b;
	--bs-pagination-disabled-color: #777;
	--bs-pagination-disabled-bg: #fff;
	--bs-pagination-disabled-border-color: #ddd;
	display: inline-flex;
	margin: 20px 0;
}

.page-link {
	line-height: 1.42857143;
	transition: none;
}

.breadcrumb {
	--bs-breadcrumb-padding-x: 15px;
	--bs-breadcrumb-padding-y: 8px;
	--bs-breadcrumb-margin-bottom: 20px;
	--bs-breadcrumb-bg: #f5f5f5;
	--bs-breadcrumb-border-radius: 4px;
	--bs-breadcrumb-divider-color: #ccc;
	--bs-breadcrumb-item-padding-x: 5px;
	--bs-breadcrumb-item-active-color: #777;
}

.list-group {
	--bs-list-group-color: inherit;
	--bs-list-group-bg: #fff;
	--bs-list-group-border-color: #ddd;
	--bs-list-group-border-radius: 4px;
	--bs-list-group-item-padding-x: 15px;
	--bs-list-group-item-padding-y: 10px;
	--bs-list-group-action-color: #555;
	--bs-list-group-action-hover-color: #555;
	--bs-list-group-action-hover-bg: #f5f5f5;
	--bs-list-group-action-active-color: #555;
	--bs-list-group-action-active-bg: #f5f5f5;
	--bs-list-group-disabled-color: #777;
	--bs-list-group-disabled-bg: #eee;
	--bs-list-group-active-color: #fff;
	--bs-list-group-active-bg: #337ab7;
	--bs-list-group-active-border-color: #337ab7;
	margin-bottom: 20px;
}

/* Bootstrap 3 solapaba los bordes de los elementos con margin-bottom: -1px */
.list-group-item + .list-group-item {
	margin-top: -1px;
	border-top-width: 1px;
}

/* El badge de Bootstrap 3 (gris por defecto) */
.badge {
	--bs-badge-padding-x: 7px;
	--bs-badge-padding-y: 3px;
	--bs-badge-font-size: 12px;
	--bs-badge-font-weight: bold;
	--bs-badge-color: #fff;
	--bs-badge-border-radius: 10px;
	min-width: 10px;
	line-height: 1;
	background-color: #777;
}

.tooltip {
	--bs-tooltip-max-width: 200px;
	--bs-tooltip-padding-x: 8px;
	--bs-tooltip-padding-y: 3px;
	--bs-tooltip-font-size: 12px;
	--bs-tooltip-color: #fff;
	--bs-tooltip-bg: #000;
	--bs-tooltip-border-radius: 4px;
	--bs-tooltip-opacity: .9;
	--bs-tooltip-arrow-width: 10px;
	--bs-tooltip-arrow-height: 5px;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	line-height: 1.42857143;
}


/* --------------------------------------------------------------------------
   8. Componentes propios (venían de Bootstrap 3 y Bootstrap 5 no los tiene)
   -------------------------------------------------------------------------- */

/* Caja gris, el antiguo «well»: <div class="card card-body card-well"> */
.card-well {
	min-height: 20px;
	padding: 19px;
	margin-bottom: 20px;
	color: inherit;
	background-color: #f5f5f5;
	border: 1px solid #e3e3e3;
	border-radius: 4px;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}

.card-well.card-well-lg { padding: 24px; border-radius: 6px; }

.card-well.card-well-sm { padding: 9px; border-radius: 3px; }

/* Anterior / siguiente del blog y de prensa (el «pager» de Bootstrap 3) */
.pager {
	padding-left: 0;
	margin: 20px 0;
	list-style: none;
	text-align: center;
}

.pager:before,
.pager:after { display: table; content: " "; }

.pager:after { clear: both; }

.pager li { display: inline; }

.pager li > a,
.pager li > span {
	display: inline-block;
	padding: 5px 14px;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 15px;
}

.pager li > a:hover,
.pager li > a:focus {
	text-decoration: none;
	background-color: #eee;
}

.pager .next > a,
.pager .next > span { float: right; }

.pager .previous > a,
.pager .previous > span { float: left; }

.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
	color: #777;
	background-color: #fff;
	cursor: not-allowed;
}


/* --------------------------------------------------------------------------
   Grupo 2 · Área de cliente
   -------------------------------------------------------------------------- */

/* Campo (cmp-campo, antes sm-form-control de Canvas) dentro de un input-group, como en los
   filtros de «Mis pedidos»: en Bootstrap 3 el grupo era una tabla y el campo
   ocupaba el resto de la fila; en Bootstrap 5 es flex y, con width: 100%,
   el campo saltaba debajo de la etiqueta */
.input-group > .cmp-campo {
	position: relative;
	flex: 1 1 auto;
	width: 1%;
	min-width: 0;
}


/* --------------------------------------------------------------------------
   Grupo 4 · Distribuidores, formación y tratamientos
   -------------------------------------------------------------------------- */

/* La paginación de Bootstrap 3 era un inline-block sin líneas de texto: su
   línea base era el borde inferior y debajo quedaba el hueco del descendente
   (~6 px). La de Bootstrap 5 es inline-flex y toma la línea base del texto
   del primer número, así que el bloque que la contiene medía menos. Un primer
   elemento vacío pegado abajo devuelve la línea base al borde inferior. */
.pagination::before {
	content: "";
	align-self: flex-end;
}
