/*=============== BANNER DE COOKIES ===============*/
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white-color);
  border-top: 3px solid var(--first-color);
  padding: var(--mb-1-5) var(--mb-1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-family: var(--body-font);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--mb-1);
}

.cookie-banner__content {
  display: flex;
  flex-direction: column;
  gap: var(--mb-0-75);
}

.cookie-banner__title {
  font-family: var(--title-font);
  font-size: var(--h3-font-size);
  color: var(--title-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--mb-0-5);
}

.cookie-banner__icon {
  margin-right: var(--mb-0-5);
  transition: transform 0.2s ease;
}

.cookie-banner__title:hover .cookie-banner__icon {
  transform: scale(1.1);
}

.cookie-banner__text {
  font-size: var(--normal-font-size);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
}

.cookie-banner__link {
  color: var(--first-color);
  text-decoration: underline;
  font-weight: 500;
}

.cookie-banner__link:hover {
  color: var(--first-color-second);
}

.cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: var(--mb-0-75);
}

.cookie-banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mb-0-75);
}

.cookie-banner__button {
  padding: var(--mb-0-75) var(--mb-1-5);
  border: none;
  border-radius: 6px;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 120px;
}

.cookie-banner__button:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 2px;
}

.cookie-banner__button--primary {
  background: var(--first-color);
  color: var(--white-color);
}

.cookie-banner__button--primary:hover {
  background: var(--first-color-second);
}

.cookie-banner__button--secondary {
  background: transparent;
  color: var(--first-color);
  border: 2px solid var(--first-color);
}

.cookie-banner__button--secondary:hover {
  background: var(--first-color);
  color: var(--white-color);
}

.cookie-banner__button--minimal {
  background: transparent;
  color: var(--text-color);
  border: 1px solid #e5e7eb;
}

.cookie-banner__button--minimal:hover {
  background: #f9fafb;
  color: var(--title-color);
}

/*=============== MODAL DE PREFERENCIAS DE COOKIES ===============*/
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--mb-1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal.show {
  opacity: 1;
  visibility: visible;
}

.cookie-modal__dialog {
  background: var(--white-color);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  padding: var(--mb-2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cookie-modal.show .cookie-modal__dialog {
  transform: scale(1);
}

.cookie-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mb-1-5);
  padding-bottom: var(--mb-1);
  border-bottom: 1px solid #e5e7eb;
}

.cookie-modal__title {
  font-family: var(--title-font);
  font-size: var(--h3-font-size);
  color: var(--title-color);
  margin: 0;
}

.cookie-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
  padding: var(--mb-0-5);
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.cookie-modal__close:hover {
  background: #f3f4f6;
}

.cookie-modal__close:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 2px;
}

.cookie-modal__content {
  margin-bottom: var(--mb-2);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.cookie-modal__description {
  font-size: var(--small-font-size);
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: var(--mb-1-5);
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: var(--mb-1);
}

.cookie-category {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: var(--mb-1);
}

.cookie-category__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mb-0-5);
}

.cookie-category__title {
  font-family: var(--title-font);
  font-size: var(--normal-font-size);
  color: var(--title-color);
  margin: 0;
}

.cookie-category__toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.cookie-category__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-category__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

.cookie-category__slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.cookie-category__toggle input:checked + .cookie-category__slider {
  background-color: var(--first-color);
}

.cookie-category__toggle input:checked + .cookie-category__slider:before {
  transform: translateX(24px);
}

.cookie-category__toggle input:focus-visible + .cookie-category__slider {
  box-shadow: 0 0 0 2px var(--first-color);
}

.cookie-category__description {
  font-size: var(--smaller-font-size);
  color: var(--text-color);
  line-height: 1.5;
}

.cookie-category--required {
  background-color: #f9fafb;
}

.cookie-category--required .cookie-category__toggle {
  opacity: 0.5;
  pointer-events: none;
}

.cookie-modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--mb-0-75);
  padding-top: var(--mb-1);
  border-top: 1px solid #e5e7eb;
}

@media screen and (min-width: 480px) {
  .cookie-modal__actions {
    flex-direction: row;
    justify-content: flex-end;
  }
  
  .cookie-modal__actions .cookie-banner__button {
    min-width: 140px;
  }
}

/*=============== TOGGLE DE PREFERENCIAS DE COOKIES ===============*/
.cookie-preferences-toggle {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  background: var(--first-color);
  color: var(--white-color);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cookie-preferences-toggle:hover {
  background: var(--first-color-second);
  color: var(--white-color);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-preferences-toggle:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 4px;
}

.cookie-preferences-toggle:active {
  transform: scale(0.95);
}

/*=============== ICONO DE COOKIES ===============*/
.cookie-icon {
  transition: transform 0.2s ease;
}

.cookie-preferences-toggle:hover .cookie-icon {
  transform: scale(1.1);
}


/*=============== MEDIA QUERIES PARA EL BANNER DE COOKIES ===============*/
@media screen and (min-width: 768px) {
  .cookie-banner__container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-banner__content {
    flex: 1;
    margin-right: var(--mb-2);
  }

  .cookie-banner__actions {
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
  }

  .cookie-banner__buttons {
    flex-direction: row;
  }

  .cookie-banner__button {
    white-space: nowrap;
  }

  .cookie-preferences-toggle {
    left: 2rem;
    bottom: 2rem;
  }
}

@media screen and (min-width: 1024px) {
  .cookie-banner {
    padding: var(--mb-2) var(--mb-2-5);
  }

  .cookie-modal__dialog {
    max-width: 500px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-modal,
  .cookie-modal__dialog,
  .cookie-category__slider,
  .cookie-category__slider:before,
  .cookie-preferences-toggle,
  .cookie-icon,
  .cookie-banner__icon {
    transition: none;
  }
} 