/* === GDPR Cookie Notice Container === */
.gdpr-cookie-notice {
  position: fixed;
  background: #f9f9f9; /* antes: #d5d0d0 - fondo claro para mejor contraste */
  left: 0;
  bottom: 0;
  right: 0;
  padding: 20px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-transition: all ease 1s;
  transition: all ease 1s;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #333333; /* texto gris oscuro por defecto */
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .gdpr-cookie-notice {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }
}

/* Show notice when loaded */
.gdpr-cookie-notice-loaded .gdpr-cookie-notice {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* === Cookie Notice Description === */
.gdpr-cookie-notice-description {
  margin: 0;
  padding: 0 16px 0 0;
  color: #333333; /* antes: rgba(255,255,255,0.75) - mejora de contraste */
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

@media (max-width: 768px) {
  .gdpr-cookie-notice-description {
    padding: 0;
    margin: 0 0 10px 0;
    font-size: 12px;
    line-height: 18px;
  }
}

/* === Navigation Buttons === */
.gdpr-cookie-notice-nav {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-left: auto;
  background: none;
  width: auto;
  height: auto;
  padding: 0;
}

.gdpr-cookie-notice-nav-item {
  text-decoration: none;
  display: block;
  height: 44px;           /* antes: 40px - tamaño táctil mínimo */
  line-height: 44px;      /* sincronizado con height */
  white-space: nowrap;
  color: #333333;         /* antes: #000000 - gris oscuro consistente */
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
}

/* Estado de foco visible accesible para elementos interactivos */
.gdpr-cookie-notice-nav-item:focus-visible,
.gdpr-cookie-notice-modal-footer-item:focus-visible,
.gdpr-cookie-notice-modal-footer-item-btn:focus-visible,
.gdpr-cookie-notice-modal-close:focus-visible,
.gdpr-cookie-notice-modal-cookie-input-switch:focus-visible {
  outline: 3px solid #0a7f40; /* color con contraste */
  outline-offset: 2px;
  border-radius: 6px;
}

.gdpr-cookie-notice-nav-item:hover {
  text-decoration: none;
}

/* Botón principal en la barra (ACEPTAR / GUARDAR) con contraste AA */
.gdpr-cookie-notice-nav-item-btn {
  background: #0a7f40;    /* antes: #1ad56c - ahora AA con texto blanco */
  border-radius: 8px;     /* redondeado moderno */
  color: #ffffff;
  border: none;
  padding: 0 18px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: background 0.2s ease, transform 0.15s ease;
}

.gdpr-cookie-notice-nav-item-btn:hover {
  background: #0b6e39;    /* hover más oscuro, mantiene contraste */
  transform: translateY(-1px);
}

/* === Modal === */
.gdpr-cookie-notice-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1001;
  overflow: auto;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 20px 10px;
  display: none;
}

.gdpr-cookie-notice-show-modal .gdpr-cookie-notice-modal {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.gdpr-cookie-notice-modal-content {
  width: 470px;
  border-radius: 8px;     /* leve mejora */
  background: #ffffff;    /* antes: #000000 - fondo claro accesible */
  color: #333333;         /* texto legible en fondo claro */
  margin: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* === Modal Header === */
.gdpr-cookie-notice-modal-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0; /* sutil */
}

.gdpr-cookie-notice-modal-title {
  font-size: 18px;
  color: #333333; /* antes: rgba(0,0,0,0.8) */
  font-weight: 600;
  line-height: 18px;
  margin: 0;
  padding: 0;
}

/* === Modal Close Button === */
.gdpr-cookie-notice-modal-close {
  width: 24px;
  height: 24px;
  margin-left: auto;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  position: relative;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  border-radius: 6px; /* para que el outline quede bien */
}

.gdpr-cookie-notice-modal-close:before,
.gdpr-cookie-notice-modal-close:after {
  width: 18px;
  height: 2px;
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  background: #8c8c8c; /* antes: #bdbdbd - un poco más visible */
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.gdpr-cookie-notice-modal-close:after {
  -webkit-transform: translate(-50%, -50%) rotate(90deg);
  transform: translate(-50%, -50%) rotate(90deg);
}

.gdpr-cookie-notice-modal-close:hover {
  opacity: 1;
}

/* === Cookies List === */
.gdpr-cookie-notice-modal-cookies {
  display: block;
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.gdpr-cookie-notice-modal-cookie {
  display: block;
  border-bottom: 1px solid #f4f5f7;
  padding: 0;
  margin: 0;
}

.gdpr-cookie-notice-modal-cookie-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 12px 16px;
}

.gdpr-cookie-notice-modal-cookie-title {
  font-size: 15px;
  color: #333333; /* antes: rgba(0,0,0,0.8) */
  margin: 0;
  line-height: 1;
  position: relative;
}

.gdpr-cookie-notice-modal-cookie-title:after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 5px 0 5px;
  border-color: #bdbdbd transparent transparent transparent;
  display: block;
  position: absolute;
  right: -17px;
  top: 50%;
  margin-top: -2px;
  transition: all ease 0.3s;
}

.open .gdpr-cookie-notice-modal-cookie-title:after {
  transform: rotate(180deg);
}

/* === Cookie Toggle Switch === */
.gdpr-cookie-notice-modal-cookie-state {
  color: #0a7f40; /* antes: #1ad56c - coherente con botón principal */
  margin-left: auto;
  font-size: 15px;
}

.gdpr-cookie-notice-modal-cookie-input {
  opacity: 0;
}

.gdpr-cookie-notice-modal-cookie-input:checked + .gdpr-cookie-notice-modal-cookie-input-switch {
  background: #0a7f40;       /* antes: #1ad56c - mejora contraste */
  box-shadow: inset 0 0 0 1px #0a7f40;
}

.gdpr-cookie-notice-modal-cookie-input-switch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #bdbdbd;
  margin-left: auto;
  position: relative;
  transition: all ease 0.3s;
  cursor: pointer;
}

.gdpr-cookie-notice-modal-cookie-input-switch:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg height="11" viewBox="0 0 14 11" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m5 10.42-5-5 1.41-1.41 3.59 3.58 7.59-7.59 1.41 1.42z" fill="rgb(255,255,255)" fill-rule="evenodd"/></svg>') no-repeat center 7px;
  display: block;
}

/* === Cookie Info === */
.gdpr-cookie-notice-modal-cookie-info {
  display: none;
  padding: 0 16px 12px 16px;
  font-size: 13px;
  color: #333333; /* antes: rgba(0,0,0,0.5) - mayor legibilidad */
  line-height: 16px;
}

.open .gdpr-cookie-notice-modal-cookie-info {
  display: block;
}

/* === Modal Footer === */
.gdpr-cookie-notice-modal-footer {
  background: #f7f7f7; /* antes: #f4f5f7 - sutil ajuste */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 15px 16px 16px 16px;
  border-radius: 0 0 8px 8px;
  flex-wrap: wrap;
}

.gdpr-cookie-notice-modal-footer-item {
  height: 44px;         /* antes: 40px - tamaño táctil mínimo */
  line-height: 44px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  margin: 0;
  padding: 0 14px;
  color: #333333;       /* antes: #1ad56c - enlaces legibles en claro */
  position: relative;
  border: 1px solid #c7c7c7;     /* apariencia de botón "Cancelar" accesible */
  border-radius: 8px;            /* redondeado moderno */
  background-color: #efefef;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.gdpr-cookie-notice-modal-footer-item:after {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  margin-top: -5px;
  background: url('data:image/svg+xml;utf8,<svg height="12" viewBox="0 0 8 12" width="8" xmlns="http://www.w3.org/2000/svg"><path d="m1.41 0-1.41 1.41 4.58 4.59-4.58 4.59 1.41 1.41 6-6z" fill="#999999"/></svg>') no-repeat left center; /* flecha más neutra */
  height: 12px;
  width: 8px;
  display: block;
}

.gdpr-cookie-notice-modal-footer-item:hover {
  background-color: #e3e3e3;
  transform: translateY(-1px);
}

/* Botón primario del footer (ACEPTAR/GUARDAR) con contraste AA */
.gdpr-cookie-notice-modal-footer-item-btn {
  padding: 0 18px;
  color: #ffffff;        /* antes: #000000 - ahora blanco para contraste */
  background: #0a7f40;   /* antes: #1ad56c - ahora AA */
  border-radius: 8px;
  position: relative;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: background 0.2s ease, transform 0.15s ease;
}

.gdpr-cookie-notice-modal-footer-item-btn:hover {
  background: #0b6e39;
  transform: translateY(-1px);
}

.gdpr-cookie-notice-modal-footer-item-btn span {
  transition: all ease 0.3s;
}

.gdpr-cookie-notice-modal-footer-item-btn.saved span {
  opacity: 0;
}

.gdpr-cookie-notice-modal-footer-item-btn.saved:after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  background: url('data:image/svg+xml;utf8,<svg height="11" viewBox="0 0 14 11" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m5 10.42-5-5 1.41-1.41 3.59 3.58 7.59-7.59 1.41 1.42z" fill="rgb(255,255,255)" fill-rule="evenodd"/></svg>') no-repeat center;
  transition: all ease 0.3s;
  display: block;
}

/* ===== Preferencia de usuario: reducir movimiento ===== */
@media (prefers-reduced-motion: reduce) {
  .gdpr-cookie-notice,
  .gdpr-cookie-notice-modal,
  .gdpr-cookie-notice-nav-item,
  .gdpr-cookie-notice-modal-footer-item,
  .gdpr-cookie-notice-modal-footer-item-btn,
  .gdpr-cookie-notice-modal-cookie-input-switch {
    transition: none !important;
  }
}
