/* =========================
   FOOTER - COOKIES LINK
========================= */
.contact-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-cookie-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
}

.footer-cookie-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.footer-cookie-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* =========================
   BANNER DE COOKIES
========================= */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner-content {
  width: min(1120px, 100%);
  background: linear-gradient(135deg, rgba(14, 16, 24, 0.98), rgba(23, 26, 38, 0.98));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  pointer-events: auto;
}

.cookie-banner-text {
  flex: 1 1 520px;
  min-width: 0;
  display: block;
}

.cookie-banner-text h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: #ffffff;
  word-break: break-word;
}

.cookie-banner-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
  line-height: 1.65;
  word-break: break-word;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =========================
   BOTONES GENERALES COOKIES
========================= */
.cookie-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 46px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.cookie-btn:hover {
  transform: translateY(-1px);
}

.cookie-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.cookie-btn-primary {
  background: linear-gradient(135deg, #e11b22, #b81218);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(225, 27, 34, 0.28);
}

.cookie-btn-primary:hover {
  opacity: 0.95;
}

.cookie-btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cookie-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cookie-btn-light {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-btn-light:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* =========================
   MODAL COOKIES
========================= */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal[hidden] {
  display: none !important;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.68);
  backdrop-filter: blur(4px);
}

.cookie-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  color: #1c1d24;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.cookie-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f3f3f3;
  color: #1c1d24;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
  z-index: 3;
}

.cookie-modal-close:hover {
  background: #e8e8e8;
  transform: rotate(90deg);
}

.cookie-modal-close:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

/* =========================
   CUERPO INTERNO DEL MODAL
========================= */
.cookie-modal-header,
.cookie-groups,
.cookie-modal-actions {
  padding-left: 28px;
  padding-right: 28px;
}

.cookie-modal-header {
  flex: 0 0 auto;
  padding-top: 28px;
  padding-right: 72px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eceef2;
  background: #ffffff;
}

.cookie-modal-header h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 800;
}

.cookie-modal-header p {
  margin: 0;
  color: #555b66;
  line-height: 1.7;
  font-size: 0.98rem;
}

.cookie-groups {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 184, 194, 0.9) transparent;
}

.cookie-groups::-webkit-scrollbar {
  width: 10px;
}

.cookie-groups::-webkit-scrollbar-track {
  background: transparent;
}

.cookie-groups::-webkit-scrollbar-thumb {
  background: rgba(180, 184, 194, 0.95);
  border-radius: 999px;
  border: 2px solid #ffffff;
}

/* =========================
   GRUPOS DE COOKIES
========================= */
.cookie-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #e8eaef;
  border-radius: 18px;
  background: linear-gradient(180deg, #fcfcfc 0%, #f7f7f8 100%);
}

.cookie-group-info {
  flex: 1 1 auto;
}

.cookie-group-info h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: #16181d;
}

.cookie-group-info p {
  margin: 0;
  color: #5d6470;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================
   SWITCH
========================= */
.cookie-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.cookie-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-switch span {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: #d5d9e2;
  transition: background 0.25s ease;
  display: inline-block;
}

.cookie-switch span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease;
}

.cookie-switch input:checked + span {
  background: linear-gradient(135deg, #e11b22, #b81218);
}

.cookie-switch input:checked + span::before {
  transform: translateX(26px);
}

.cookie-switch input:disabled + span {
  opacity: 0.78;
  cursor: not-allowed;
}

/* =========================
   ACCIONES DEL MODAL
========================= */
.cookie-modal-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 24px;
  border-top: 1px solid #eceef2;
  background: #ffffff;
}

.footer-legal-link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
}

.footer-legal-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-legal-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 6px;
}

/* =========================
   BOTONES DEL MODAL COOKIES
========================= */
.cookie-modal-actions .cookie-btn-outline {
  background: #ffffff;
  color: #1c1d24;
  border: 1px solid #d7dce5;
  box-shadow: none;
}

.cookie-modal-actions .cookie-btn-outline:hover {
  background: #f3f5f8;
  border-color: #c7ced9;
}

.cookie-modal-actions .cookie-btn-outline:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.cookie-modal-actions .cookie-btn-primary {
  color: #ffffff;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 860px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cookie-banner-text {
    width: 100%;
    flex: 1 1 auto;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-banner-content {
    width: 100%;
    padding: 18px 16px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
  }

  .cookie-banner-text {
    display: block;
    width: 100%;
    flex: 0 0 auto;
  }

  .cookie-banner-text h3 {
    display: block;
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.25;
    color: #ffffff;
  }

  .cookie-banner-text p {
    display: block;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
  }

  .cookie-banner-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .cookie-btn {
    width: 100%;
  }

  .cookie-modal {
    padding: 10px;
  }

  .cookie-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 20px;
  }

  .cookie-modal-header,
  .cookie-groups,
  .cookie-modal-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cookie-modal-header {
    padding-top: 20px;
    padding-right: 58px;
    padding-bottom: 16px;
  }

  .cookie-modal-header h3 {
    font-size: 1.2rem;
  }

  .cookie-modal-header p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .cookie-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-switch {
    align-self: flex-end;
  }

  .cookie-modal-actions {
    flex-direction: column;
    align-items: stretch;
    padding-top: 16px;
    padding-bottom: 18px;
  }
}