/* Imaginable Home · Cookies */
:root { --ih-cc-accent: #8a6414; --ih-cc-ink: #2b2b2b; --ih-cc-bg: #ffffff; --ih-cc-line: #d9d9d9; }

.ih-cc, .ih-cc__overlay, .ih-cc-reopen, .ih-cc-placeholder {
	font-family: Urbanist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 15px; line-height: 1.5; color: var(--ih-cc-ink); box-sizing: border-box;
}
.ih-cc *, .ih-cc__overlay *, .ih-cc-reopen, .ih-cc-placeholder * { box-sizing: border-box; }
.ih-cc[hidden], .ih-cc__overlay[hidden], .ih-cc-reopen[hidden] { display: none !important; }

/* Tarjeta inferior (no bloquea la página) */
.ih-cc {
	position: fixed; z-index: 99998; left: 16px; bottom: 16px; width: min(440px, calc(100vw - 32px));
	background: var(--ih-cc-bg); border: 1px solid var(--ih-cc-line); border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .18); padding: 20px 20px 18px;
}
.ih-cc__title { margin: 0 0 6px; font-family: "Playfair Display", Georgia, serif; font-size: 20px; line-height: 1.25; font-weight: 600; }
.ih-cc__text { margin: 0 0 14px; }
.ih-cc__link { color: var(--ih-cc-accent); text-decoration: underline; text-underline-offset: 2px; }
.ih-cc__link:hover { text-decoration-thickness: 2px; }

.ih-cc__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ih-cc__btn {
	flex: 1 1 auto; min-height: 44px; padding: 10px 16px; border-radius: 4px; cursor: pointer;
	font: inherit; font-weight: 600; text-align: center; border: 2px solid var(--ih-cc-ink);
	transition: background-color .15s, color .15s;
}
/* Aceptar y Rechazar: exactamente el mismo estilo y peso visual */
.ih-cc__btn--solid { background: var(--ih-cc-ink); color: #fff; }
.ih-cc__btn--solid:hover { background: #000; border-color: #000; }
.ih-cc__btn--ghost { background: transparent; color: var(--ih-cc-ink); flex-basis: 100%; }
.ih-cc__btn--ghost:hover { background: #f1f1f1; }

.ih-cc__btn:focus-visible, .ih-cc__close:focus-visible, .ih-cc-reopen:focus-visible,
.ih-cc__link:focus-visible, .ih-cc__details summary:focus-visible, .ih-cc__switch:focus-visible + .ih-cc__track {
	outline: 3px solid var(--ih-cc-accent); outline-offset: 2px;
}

/* Panel modal */
.ih-cc__overlay {
	position: fixed; inset: 0; z-index: 99999; background: rgba(0, 0, 0, .5);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ih-cc__dialog {
	background: var(--ih-cc-bg); border-radius: 6px; width: min(600px, 100%); max-height: calc(100vh - 32px);
	display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); outline: none;
}
.ih-cc__panelhead { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.ih-cc__ptitle { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 22px; font-weight: 600; }
.ih-cc__close { background: none; border: 0; font-size: 30px; line-height: 1; width: 44px; height: 44px; cursor: pointer; color: var(--ih-cc-ink); }
.ih-cc__panelbody { padding: 0 20px 8px; overflow-y: auto; }
.ih-cc__actions--panel { padding: 14px 20px 20px; border-top: 1px solid var(--ih-cc-line); }

.ih-cc__cat { border-top: 1px solid var(--ih-cc-line); padding: 14px 0; }
.ih-cc__cathead { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; }
.ih-cc__catname { font-weight: 700; font-size: 16px; }
.ih-cc__always { font-size: 13px; font-weight: 600; color: var(--ih-cc-accent); }
.ih-cc__catdesc { margin: 4px 0 8px; font-size: 14px; }
.ih-cc__sr { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* Interruptor */
.ih-cc__switch {
	appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 auto;
	width: 48px; height: 28px; margin: 0; border-radius: 28px; cursor: pointer;
	background: #767676; border: 2px solid #767676; transition: background-color .15s, border-color .15s;
}
.ih-cc__switch::after {
	content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
	background: #fff; transition: transform .15s;
}
.ih-cc__switch:checked { background: var(--ih-cc-accent); border-color: var(--ih-cc-accent); }
.ih-cc__switch:checked::after { transform: translateX(20px); }
.ih-cc__switch:focus-visible { outline: 3px solid var(--ih-cc-accent); outline-offset: 3px; }

/* Tabla de cookies */
.ih-cc__details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ih-cc-accent); padding: 4px 0; }
.ih-cc__tablewrap { overflow-x: auto; margin-top: 6px; }
.ih-cc__table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ih-cc__table th, .ih-cc__table td { border: 1px solid var(--ih-cc-line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ih-cc__table th { background: #f6f6f6; }

/* Botón para reabrir: solo icono (abajo a la izquierda, para no pisar el chat de WhatsApp). El texto sale al pasar el ratón o al enfocar. */
.ih-cc-reopen {
	position: fixed; z-index: 99990; left: 12px; bottom: 12px; display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
	background: var(--ih-cc-bg); color: var(--ih-cc-ink); border: 1px solid var(--ih-cc-line); box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.ih-cc-reopen svg { width: 22px; height: 22px; }
.ih-cc-reopen:hover { background: #f1f1f1; }
.ih-cc-reopen::after {
	content: attr(data-ih-tip); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
	padding: 5px 10px; border-radius: 6px; background: #282828; color: #fff; font-size: 13px; font-weight: 500; line-height: 1.2;
	white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .15s;
}
.ih-cc-reopen:focus-visible::after { opacity: 1; visibility: visible; }
@media (hover: hover) and (pointer: fine) {
	.ih-cc-reopen:hover::after { opacity: 1; visibility: visible; }
}

/* Aviso en contenido incrustado bloqueado */
.ih-cc-placeholder {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
	min-height: 180px; padding: 20px; background: #f6f6f6; border: 1px dashed #8d8d8d;
}
.ih-cc-placeholder p { margin: 0; }
.ih-cc-placeholder .ih-cc__btn { flex: 0 0 auto; }

html.ih-cc-lock { overflow: hidden; }

.ih-cc-table { border-collapse: collapse; width: 100%; margin-bottom: 1.5em; }
.ih-cc-table th, .ih-cc-table td { border: 1px solid #d9d9d9; padding: 8px 10px; text-align: left; vertical-align: top; }

@media (max-width: 600px) {
	.ih-cc { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 16px; }
	.ih-cc__btn { flex-basis: 100%; }
	.ih-cc__overlay { padding: 8px; align-items: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
	.ih-cc__btn, .ih-cc__switch, .ih-cc__switch::after { transition: none; }
}
