/**
 * Banner y panel de cookies. Los colores llegan como variables CSS desde los
 * ajustes del plugin (ver orlck_css_colores()).
 */

.orlck-oculto { display: none !important; }

.orlck-root,
.orlck-root * { box-sizing: border-box; }

/* --- Capa que impide navegar hasta decidir ------------------------------ */

.orlck-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .5);
	z-index: 9999998;
	cursor: not-allowed;
}

html.orlck-bloqueado,
html.orlck-bloqueado body { overflow: hidden !important; }

/* --- Banner ------------------------------------------------------------- */

.orlck-banner {
	position: fixed;
	width: 440px;
	max-width: calc(100% - 32px);
	z-index: 9999999;
	border-radius: 6px;
	font-family: inherit;
}

.orlck-pos-bottom-left  { bottom: 40px; left: 40px; }
.orlck-pos-bottom-right { bottom: 40px; right: 40px; }
.orlck-pos-top-left     { top: 40px; left: 40px; }
.orlck-pos-top-right    { top: 40px; right: 40px; }

.orlck-pos-barra {
	bottom: 0;
	left: 0;
	width: 100%;
	max-width: 100%;
	border-radius: 0;
}

.orlck-pos-modal {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 999999999;
}

.orlck-caja {
	background: var(--orlck-fondo, #fff);
	color: var(--orlck-texto, #212121);
	border: 1px solid var(--orlck-borde, #f4f4f4);
	border-radius: 6px;
	padding: 20px 26px;
	box-shadow: 0 -1px 10px 0 rgba(172, 171, 171, .3);
}

.orlck-pos-barra .orlck-caja {
	border-radius: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 18px 40px;
}

.orlck-pos-barra .orlck-desc { flex: 1 1 420px; }
.orlck-pos-barra .orlck-titulo { flex: 1 1 100%; }
.orlck-pos-barra .orlck-botones { margin-top: 0; flex: 0 1 auto; }

.orlck-titulo {
	margin: 0 0 12px;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	color: inherit;
	word-break: break-word;
}

.orlck-desc,
.orlck-desc p {
	font-size: 14px;
	line-height: 22px;
	font-weight: 400;
	color: inherit;
	margin: 0;
}

.orlck-desc p + p { margin-top: 8px; }

.orlck-politica,
.orlck-desc a {
	color: var(--orlck-enlace, #0056a7);
	text-decoration: underline;
	font-size: inherit;
}

/* --- Botones ------------------------------------------------------------ */

.orlck-botones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
}

.orlck-btn {
	flex: auto;
	max-width: 100%;
	min-height: 0;
	margin: 0;
	padding: 8px 12px;
	font-family: inherit;
	font-size: 14px;
	line-height: 24px;
	font-weight: 500;
	text-align: center;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	border: 2px solid var(--orlck-acento, #fe5000);
	border-radius: 2px;
	cursor: pointer;
	overflow-wrap: break-word;
}

.orlck-btn:hover { opacity: .85; text-decoration: none; }

.orlck-btn:focus-visible {
	outline: 2px solid var(--orlck-enlace, #0056a7);
	outline-offset: 2px;
}

.orlck-btn-personalizar,
.orlck-btn-guardar,
.orlck-btn-rechazar {
	color: var(--orlck-acento, #fe5000);
	background: transparent;
}

.orlck-btn-aceptar {
	color: var(--orlck-boton_texto, #fff);
	background: var(--orlck-acento, #fe5000);
}

.orlck-btn-aceptar:hover {
	background: var(--orlck-acento_hover, #e04800);
	border-color: var(--orlck-acento_hover, #e04800);
}

/* --- Panel de preferencias ---------------------------------------------- */

.orlck-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.orlck-panel {
	width: 845px;
	max-width: 100%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	background: var(--orlck-fondo, #fff);
	color: var(--orlck-texto, #212121);
	border: 1px solid var(--orlck-borde, #f4f4f4);
	border-radius: 6px;
	box-shadow: 0 32px 68px rgba(0, 0, 0, .3);
	overflow: hidden;
}

.orlck-panel-cabecera {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 24px;
	border-bottom: 1px solid var(--orlck-borde, #f4f4f4);
}

.orlck-panel-titulo {
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
}

.orlck-cerrar {
	width: 24px;
	height: 24px;
	padding: 0;
	line-height: 0;
	color: inherit;
	background: none;
	border: none;
	box-shadow: none;
	cursor: pointer;
}

.orlck-panel-cuerpo {
	padding: 22px 24px;
	overflow-y: auto;
}

.orlck-panel-desc,
.orlck-panel-desc p,
.orlck-acordeon-desc,
.orlck-acordeon-desc p {
	font-size: 13px;
	line-height: 20px;
	color: inherit;
	margin: 0;
}

.orlck-panel-desc p + p { margin-top: 8px; }

.orlck-acordeones { margin-top: 18px; }

.orlck-acordeon {
	padding: 14px 0;
	border-bottom: 1px solid var(--orlck-borde, #f4f4f4);
}

.orlck-acordeon:last-child { border-bottom: none; }

.orlck-acordeon-cabecera {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.orlck-acordeon-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 24px;
	color: inherit;
	text-align: left;
	background: none;
	border: none;
	box-shadow: none;
	cursor: pointer;
}

.orlck-chevron {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .2s ease;
}

.orlck-acordeon-btn[aria-expanded="true"] .orlck-chevron { transform: rotate(45deg); }

.orlck-acordeon-desc { margin-top: 8px; padding-left: 16px; }

.orlck-acordeon-cuerpo { margin-top: 12px; padding-left: 16px; }

.orlck-siempre {
	color: #2c7a2c;
	font-size: 13px;
	font-weight: 600;
	line-height: 24px;
	white-space: nowrap;
}

/* Interruptor */
.orlck-switch {
	position: relative;
	flex: 0 0 auto;
	width: 42px;
	height: 22px;
	margin: 0;
}

.orlck-switch input {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.orlck-slider {
	position: absolute;
	inset: 0;
	background: #d0d5d2;
	border-radius: 22px;
	transition: background .2s ease;
}

.orlck-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}

.orlck-switch input:checked + .orlck-slider { background: var(--orlck-acento, #fe5000); }
.orlck-switch input:checked + .orlck-slider::before { transform: translateX(20px); }
.orlck-switch input:focus-visible + .orlck-slider { outline: 2px solid var(--orlck-enlace, #0056a7); outline-offset: 2px; }

.orlck-panel-pie {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: center;
	padding: 18px 24px;
	border-top: 1px solid var(--orlck-borde, #f4f4f4);
}

/* --- Tabla de cookies ---------------------------------------------------- */

.orlck-tabla-envoltorio { overflow-x: auto; }

.orlck-tabla {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	line-height: 18px;
	background: #f7f7f7;
	border-radius: 6px;
}

.orlck-tabla th,
.orlck-tabla td {
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #ebebeb;
}

.orlck-tabla th { font-weight: 600; white-space: nowrap; }
.orlck-tabla tr:last-child td { border-bottom: none; }
.orlck-tabla code { font-size: 12px; background: none; padding: 0; word-break: break-all; }

.orlck-sin-cookies { font-size: 12px; line-height: 20px; margin: 0; opacity: .8; }

/* --- Botón para volver a abrir el panel ---------------------------------- */

.orlck-revisit {
	position: fixed;
	z-index: 999999;
	width: 45px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--orlck-revisit, #0056a7);
	border-radius: 50%;
	cursor: pointer;
}

.orlck-revisit-bottom-left  { bottom: 15px; left: 15px; }
.orlck-revisit-bottom-right { bottom: 15px; right: 15px; }

.orlck-revisit button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	color: #fff;
	background: none;
	border: none;
	box-shadow: none;
	cursor: pointer;
}

.orlck-revisit:hover::before {
	content: attr(data-tooltip);
	position: absolute;
	left: calc(100% + 8px);
	width: max-content;
	padding: 4px 8px;
	font-size: 12px;
	line-height: 16px;
	color: #fff;
	background: #4e4b66;
	border-radius: 4px;
}

.orlck-revisit-bottom-right:hover::before { left: auto; right: calc(100% + 8px); }

/* --- Aviso sobre contenidos incrustados bloqueados ------------------------ */

.orlck-relativo { position: relative; }

.orlck-iframe-oculto { visibility: hidden; }

.orlck-aviso {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 160px;
	padding: 20px;
	text-align: center;
	color: #fff;
	background: #1c1c1c;
	border-radius: 4px;
}

.orlck-aviso-titulo { margin: 0; font-size: 15px; font-weight: 700; }
.orlck-aviso-texto  { margin: 0; font-size: 13px; line-height: 20px; max-width: 480px; }
.orlck-aviso .orlck-btn { flex: 0 0 auto; margin-top: 6px; }

/* --- Móvil ---------------------------------------------------------------- */

@media (max-width: 576px) {
	.orlck-banner {
		width: 100%;
		max-width: 100%;
		bottom: 0;
		left: 0;
		right: auto;
		top: auto;
		transform: none;
	}

	.orlck-caja { border-radius: 0; padding: 18px 20px; }
	.orlck-botones { flex-direction: column; gap: 10px; }
	.orlck-btn { width: 100%; }
	.orlck-botones .orlck-btn-aceptar { order: 1; }
	.orlck-botones .orlck-btn-rechazar { order: 2; }
	.orlck-botones .orlck-btn-personalizar { order: 3; }
	.orlck-panel { max-height: 92vh; }
	.orlck-panel-cuerpo { padding: 18px 16px; }
	.orlck-panel-pie { flex-direction: column; }
	.orlck-panel-pie .orlck-btn { width: 100%; }
	.orlck-tabla thead { display: none; }
	.orlck-tabla,
	.orlck-tabla tbody,
	.orlck-tabla tr,
	.orlck-tabla td { display: block; width: 100%; }
	.orlck-tabla tr { border-bottom: 1px solid #ebebeb; padding: 6px 0; }
	.orlck-tabla td { border: none; padding: 3px 10px; }
	.orlck-tabla td::before { content: attr(data-etiqueta) ": "; font-weight: 600; }
}
