/*
 * Banner de consentimiento de cookies propio (sustituye a Cookiebot, oct-2026).
 * Réplica visual del popup Cookiebot "Multilevel" que tenía paladin.es: medidas tomadas del original
 * (modal 900px, cabecera 78px, pestañas 57px, fila de categorías 113px, botones 58px, alto máx. 80vh).
 */
#pcc-dialog, #pcc-dialog * { box-sizing: border-box; }

#pcc-dialog {
  --pcc-accent: #ff0000;
  --pcc-text: #141414;
  --pcc-line: #d6d6d6;
  --pcc-off: #141414;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147483647;
  width: 900px;
  max-width: calc(100vw - 32px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--pcc-text);
  border-radius: 8px;
  box-shadow: 0 32px 68px rgba(0, 0, 0, .3);
  font-family: sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: .1px;
  text-align: left;
  opacity: 0;
  transition: opacity .5s ease;
}
#pcc-dialog.pcc-visible { opacity: 1; }
#pcc-dialog[hidden] { display: none; }
#pcc-dialog:focus { outline: 0; }

#pcc-dialog button { font-family: inherit; cursor: pointer; margin: 0; text-transform: none; }
#pcc-dialog label { margin: 0; font-weight: inherit; color: var(--pcc-text); }
#pcc-dialog p { font-family: inherit; font-size: inherit; color: inherit; }
#pcc-dialog a { color: var(--pcc-accent); text-decoration: underline; }

/* Cabecera */
.pcc-header {
  flex: none;
  display: flex;
  align-items: center;
  height: 78px;
  padding: 0 22px;
  border-bottom: 1px solid var(--pcc-line);
}
.pcc-header img { height: 32px; width: auto; display: block; }

/* Pestañas */
.pcc-nav {
  flex: none;
  display: flex;
  border-bottom: 1px solid var(--pcc-line);
}
#pcc-dialog .pcc-tab {
  flex: 1;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 15px 8px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  color: var(--pcc-text);
}
#pcc-dialog .pcc-tab:hover { color: var(--pcc-accent); }
#pcc-dialog .pcc-tab:focus { outline: 0; }
#pcc-dialog .pcc-tab:focus-visible { outline: 2px solid var(--pcc-accent); outline-offset: -2px; }
#pcc-dialog .pcc-tab[aria-selected="true"] { color: var(--pcc-accent); border-bottom-color: var(--pcc-accent); }

/* Cuerpo */
.pcc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pcc-panel { padding: 23px 22px; }
.pcc-panel[hidden] { display: none; }
#pcc-dialog .pcc-title {
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 24px; letter-spacing: .25px;
  color: var(--pcc-text); text-align: left; text-transform: none; margin: 0 0 8px; padding: 0;
}
#pcc-dialog .pcc-text { margin: 0; letter-spacing: .5px; line-height: 24px; }
#pcc-dialog .pcc-text + .pcc-text { margin-top: 12px; }

/* Interruptores */
.pcc-switch { position: relative; display: inline-block; width: 57px; height: 32px; flex: none; }
.pcc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.pcc-switch input:disabled { cursor: not-allowed; }
.pcc-slider {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: var(--pcc-off);
  border-radius: 32px;
  transition: background-color .2s;
}
.pcc-slider::before {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  left: 4px; top: 4px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.pcc-switch input:checked + .pcc-slider { background: var(--pcc-accent); }
.pcc-switch input:checked + .pcc-slider::before { transform: translateX(25px); }
.pcc-switch input:focus-visible + .pcc-slider { outline: 2px solid var(--pcc-accent); outline-offset: 2px; }

/* Fila de categorías (pestaña Consentimiento) */
.pcc-levels {
  display: flex;
  border-top: 1px solid var(--pcc-line);
}
.pcc-levels[hidden] { display: none; }
.pcc-level {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 8px 23px;
}
#pcc-dialog .pcc-level label { font-weight: 600; margin-bottom: 11px; }
.pcc-level + .pcc-level { border-left: 1px solid var(--pcc-line); }

/* Pestaña Detalles */
.pcc-cat { border-bottom: 1px solid var(--pcc-line); padding: 16px 0; }
.pcc-cat:first-child { padding-top: 0; }
.pcc-cat:last-child { border-bottom: 0; }
.pcc-cat-head { display: flex; align-items: center; gap: 12px; }
#pcc-dialog .pcc-cat-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--pcc-text);
  text-align: left;
}
#pcc-dialog .pcc-cat-toggle:focus { outline: 0; }
.pcc-chevron {
  width: 8px; height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin: 0 6px 4px 2px;
  transition: transform .2s;
}
.pcc-cat-toggle[aria-expanded="false"] .pcc-chevron { transform: rotate(-45deg); margin-bottom: 0; }
.pcc-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 10px;
  background: #d6d6d6;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 600;
}
.pcc-cat-body { padding: 8px 0 0 30px; font-size: 14px; }
.pcc-cat-body[hidden] { display: none; }
#pcc-dialog .pcc-cat-body p { margin: 0 0 8px; letter-spacing: .5px; line-height: 22px; }
.pcc-table-wrap { overflow-x: auto; }
.pcc-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #f7f7f7; border-radius: 4px; }
.pcc-table th, .pcc-table td { text-align: left; padding: 8px 10px; vertical-align: top; }
.pcc-table th { font-weight: 600; border-bottom: 1px solid var(--pcc-line); white-space: nowrap; }
.pcc-table tr + tr td { border-top: 1px solid #e8e8e8; }
#pcc-dialog .pcc-empty { font-style: italic; }

/* Botones */
.pcc-footer {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 14px 22px 24px;
  border-top: 1px solid var(--pcc-line);
}
#pcc-dialog .pcc-btn {
  flex: 1;
  min-height: 58px;
  padding: 15px;
  background: #fff;
  color: var(--pcc-text);
  border: 2px solid var(--pcc-accent);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: normal;
  transition: background-color .15s, color .15s;
}
#pcc-dialog .pcc-btn:hover, #pcc-dialog .pcc-btn:focus-visible { background: var(--pcc-accent); color: #fff; outline: 0; }

@media (max-width: 600px) {
  #pcc-dialog { font-size: 14px; max-height: calc(100vh - 32px); }
  .pcc-header { height: 64px; padding: 0 16px; }
  #pcc-dialog .pcc-tab { font-size: 14px; padding: 12px 4px 9px; }
  .pcc-panel { padding: 16px; }
  .pcc-levels { flex-wrap: wrap; }
  .pcc-level { flex: 1 1 50%; padding: 12px 8px; }
  .pcc-level + .pcc-level { border-left: 0; }
  .pcc-level:nth-child(even) { border-left: 1px solid var(--pcc-line); }
  .pcc-level:nth-child(n+3) { border-top: 1px solid var(--pcc-line); }
  #pcc-dialog .pcc-level label { margin-bottom: 8px; }
  .pcc-footer { flex-direction: column; padding: 12px 16px 16px; }
  #pcc-dialog .pcc-btn { min-height: 46px; padding: 10px 16px; }
  .pcc-cat-body { padding-left: 0; }
}
