@import url("https://fonts.googleapis.com/css2?family=Noto+Emoji&display=swap");

/* Cookies: banner, panel de configuración y pestaña permanente */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(46, 58, 68, 0.22);
  padding: 22px 24px;
  display: none;
}
.cookie-banner.is-open {
  display: block;
}
.cookie-banner p {
  font-size: 0.88rem;
  color: var(--stone);
  margin: 0 0 14px;
  line-height: 1.55;
}
.cookie-banner a {
  color: var(--blue-deep);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-actions .btn {
  flex: 1 1 140px;
  justify-content: center;
  text-align: center;
}
.cookie-config {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(46, 58, 68, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cookie-config.is-open {
  display: flex;
}
.cookie-config-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
}
.cookie-config-box h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.cookie-config-box p {
  font-size: 0.88rem;
  color: var(--stone);
  line-height: 1.55;
}
.cookie-cat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
}
.cookie-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.92rem;
}
.cookie-cat-head .state {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-deep);
}
.cookie-cat p {
  margin: 8px 0 0;
}
.cookie-switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
}
.cookie-switch input {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.cookie-switch span {
  position: absolute;
  inset: 0;
  background: #c5d3de;
  border-radius: 26px;
  transition: 0.2s;
  pointer-events: none;
}
.cookie-switch span::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.cookie-switch input:checked + span {
  background: var(--blue);
}
.cookie-switch input:checked + span::after {
  transform: translateX(20px);
}
.cookie-switch input:focus-visible + span {
  outline: 2px solid var(--blue-deep);
  outline-offset: 2px;
}
.cookie-tab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9990;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: none;
}
.cookie-tab.is-visible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cookie-tab:hover {
  border-color: var(--blue);
}
.cookie-tab::before {
  content: "🍪";
  font-family: "Noto Emoji", sans-serif;
  font-size: 1rem;
  line-height: 1;
}
.legal-text h2 {
  font-size: 1.15rem;
  margin: 34px 0 10px;
}
.legal-text h3 {
  font-size: 1rem;
  margin: 22px 0 8px;
}
.legal-text p,
.legal-text li {
  color: var(--stone);
  line-height: 1.7;
}
.legal-text ul {
  padding-left: 22px;
  margin: 10px 0;
}
.legal-text a {
  color: var(--blue-deep);
  word-break: break-word;
}
.legal-date {
  margin-top: 34px;
}
.cookie-table-wrap {
  overflow-x: auto;
  margin: 14px 0;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.cookie-table th,
.cookie-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--stone);
}
.cookie-table th {
  background: var(--sky);
  color: var(--ink);
}
.consent-box {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 6px 0 16px;
  font-size: 0.78rem;
  color: var(--stone);
  line-height: 1.55;
}
.consent-box strong {
  color: var(--ink);
}
.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.84rem;
  margin-bottom: 12px;
  color: var(--ink);
}
.consent-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}
.consent-check a {
  color: var(--blue-deep);
  text-decoration: underline;
}
@media (max-width: 640px) {
  .cookie-table thead {
    display: none;
  }
  .cookie-table,
  .cookie-table tbody,
  .cookie-table tr,
  .cookie-table td {
    display: block;
    width: 100%;
  }
  .cookie-table tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
  }
  .cookie-table td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
  }
  .cookie-table tr td:last-child {
    border-bottom: 0;
  }
  .cookie-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 2px;
  }
  .cookie-table-wrap {
    overflow: visible;
  }
}
@media (max-width: 560px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 14px 16px;
    max-height: 70vh;
    overflow: auto;
  }
  .cookie-banner p {
    font-size: 0.8rem;
    line-height: 1.45;
    margin-bottom: 10px;
  }
  .cookie-actions {
    gap: 8px;
  }
  .cookie-actions .btn {
    padding: 10px 12px;
    font-size: 0.85rem;
    flex: 1 1 40%;
  }
  #cookieConfigure {
    flex-basis: 100%;
  }
  .cookie-tab {
    right: 8px;
    bottom: 8px;
    padding: 0;
    width: 40px;
    height: 40px;
    justify-content: center;
    font-size: 0;
  }
  .cookie-tab::before {
    font-size: 1.25rem;
  }
  .cookie-config-box {
    padding: 20px;
  }
  .consent-box {
    font-size: 0.82rem;
  }
}
/* Footer compacto en móvil */
@media (max-width: 780px) {
  .site-footer {
    padding-top: 20px;
  }
  .footer-inner {
    gap: 14px;
  }
  .footer-logo {
    height: 34px;
  }
  .footer-brand p {
    font-size: 0.74rem;
  }
  .footer-groups {
    gap: 10px;
  }
  .footer-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 0.8rem;
  }
  .footer-legal {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 6px;
  }
  .footer-legal ul {
    gap: 6px 14px;
    font-size: 0.76rem;
  }
  .footer-legal p {
    font-size: 0.74rem;
  }
}
