/* =================================================================
   COOKIE CONSENT BANNER STYLES
   ================================================================= */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #8C4F77 0%, #6b3d5b 100%);
  color: white;
  border-top: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 -4px 20px rgba(140, 79, 119, 0.3);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Montserrat', sans-serif;
  backdrop-filter: blur(10px);
}

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

.cookie-consent__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.cookie-consent__content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-consent__text {
  flex: 1;
  min-width: 300px;
}

.cookie-consent__title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: white;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-consent__description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-consent__description a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cookie-consent__description a:hover {
  color: white;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.cookie-consent__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.cookie-consent__button {
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 25px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 110px;
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}

.cookie-consent__button--accept {
  background: white;
  color: #8C4F77;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cookie-consent__button--accept:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-consent__button--settings {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.cookie-consent__button--settings:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.cookie-consent__button--decline {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent__button--decline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-1px);
}

/* Body padding to prevent content overlap when banner is shown */
body.cookie-banner-active {
  padding-top: 120px;
  transition: padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  body.cookie-banner-active {
    padding-top: 160px;
  }
}

/* =================================================================
   COOKIE SETTINGS MODAL
   ================================================================= */

.cookie-settings {
  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;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

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

.cookie-settings__modal {
  background: white;
  border-radius: 1rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.cookie-settings.show .cookie-settings__modal {
  transform: scale(1);
}

.cookie-settings__header {
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-settings__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.cookie-settings__subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-settings__body {
  padding: 1.5rem 2rem;
}

.cookie-category {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
}

.cookie-category:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.cookie-category__header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
}

.cookie-category__title {
  font-weight: 600;
  color: #1f2937;
  font-size: 1.1rem;
  margin: 0;
  flex: 1;
}

.cookie-category__required {
  background: #d1fae5;
  color: #065f46;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.cookie-category__description {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.cookie-category__examples {
  color: #9ca3af;
  font-size: 0.8rem;
  font-style: italic;
  margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

.cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 24px;
}

.cookie-toggle__slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background-color: var(--color-primary, #8c4f77);
}

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

.cookie-toggle input:disabled + .cookie-toggle__slider {
  background-color: #e5e7eb;
  cursor: not-allowed;
}

.cookie-toggle input:disabled + .cookie-toggle__slider:before {
  background-color: #f3f4f6;
}

.cookie-settings__footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cookie-settings__button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-width: 120px;
}

.cookie-settings__button--save {
  background: var(--color-primary, #8c4f77);
  color: white;
}

.cookie-settings__button--save:hover {
  background: var(--color-primary-dark, #7a4569);
}

.cookie-settings__button--cancel {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.cookie-settings__button--cancel:hover {
  background: #f9fafb;
  color: #374151;
}

/* =================================================================
   COOKIE SETTINGS LINK (Floating Button)
   ================================================================= */

/* Cookie Settings Footer Link */
.cookie-settings-footer-link {
  color: var(--color-primary, white);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-settings-footer-link.show {
  opacity: 1;
  visibility: visible;
}

.cookie-settings-footer-link:hover {
  color: var(--color-primary-dark, #7a4569);
  text-decoration: underline;
}

.cookie-settings-footer-link svg {
  width: 16px;
  height: 16px;
}

/* Hide the old floating button */
.cookie-settings-link {
  display: none;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 768px) {
  .cookie-consent__container {
    padding: 1rem;
  }

  .cookie-consent__content {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .cookie-consent__text {
    min-width: auto;
  }

  .cookie-consent__title {
    font-size: 1.1rem;
  }

  .cookie-consent__description {
    font-size: 0.85rem;
  }

  .cookie-consent__actions {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }

  .cookie-consent__button {
    flex: 1;
    min-width: auto;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .cookie-settings__modal {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .cookie-settings__header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .cookie-settings__body {
    padding: 1rem 1.5rem;
  }

  .cookie-settings__footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }

  .cookie-settings__button {
    width: 100%;
  }
  .cookie-category__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
