/* ══════════════════════════════════════════════════════════════════════
   Stenzo Tech — Production-Ready Cookie Consent System CSS
   Brand Accent: rgb(219, 74, 43) (#DB4A2B)
   Scoped entirely to .cookie-consent-* classes
   ══════════════════════════════════════════════════════════════════════ */

/* ── 1. Cookie Banner ──────────────────────────────────────────────── */
.cookie-banner-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99998;
  pointer-events: none;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s ease;
}

.cookie-banner-wrapper.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cookie-banner-wrapper.is-dismissing {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.cookie-banner {
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 36px rgba(17, 24, 39, 0.08), 0 -1px 3px rgba(17, 24, 39, 0.03);
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.cookie-banner-handle {
  width: 36px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  margin: 10px auto 4px auto;
}

.cookie-banner-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 32px 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-sizing: border-box;
}

.cookie-banner-main {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

/* ── 2. Icon Badge ─────────────────────────────────────────────────── */
.cookie-banner-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #FDF1ED;
  /* Soft light peach tone */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(219, 74, 43, 0.08);
}

.cookie-banner-icon-badge svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* ── 3. Content Typography ─────────────────────────────────────────── */
.cookie-banner-content {
  flex: 1;
  min-width: 0;
}

.cookie-banner-title {
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 17px;
  font-weight: 600;
  color: var(--color-dark, #242426);
  margin: 0 0 5px 0;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.cookie-banner-text {
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-dark-80, #242426bf);
  margin: 0;
  letter-spacing: -0.01em;
}

.cookie-banner-text a,
.cookie-link {
  color: rgb(219, 74, 43);
  text-decoration: underline;
  text-underline-offset: 2.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.cookie-banner-text a:hover,
.cookie-link:hover {
  color: #c43e20;
}

/* ── 4. Action Buttons ─────────────────────────────────────────────── */
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -0.01em;
  line-height: 1;
  box-sizing: border-box;
}

.cookie-btn-outline {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cookie-btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.cookie-btn-outline:active {
  transform: translateY(0);
  background: #f3f4f6;
  box-shadow: none;
}

.cookie-btn-outline:focus-visible {
  outline: 2px solid rgb(219, 74, 43);
  outline-offset: 2px;
}

.cookie-btn-primary {
  background: rgb(219, 74, 43);
  border: 1px solid rgb(219, 74, 43);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(219, 74, 43, 0.25);
}

.cookie-btn-primary:hover {
  background: #c43e20;
  border-color: #c43e20;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(219, 74, 43, 0.35);
}

.cookie-btn-primary:active {
  transform: translateY(0);
  background: #b3361a;
  box-shadow: 0 1px 2px rgba(219, 74, 43, 0.2);
}

.cookie-btn-primary:focus-visible {
  outline: 2px solid rgb(219, 74, 43);
  outline-offset: 2px;
}

/* ── 5. Preferences Modal Dialog ───────────────────────────────────── */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  box-sizing: border-box;
}

.cookie-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cookie-modal {
  background: #ebeff5;
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(36, 36, 38, 0.05);
  border: 1px solid rgba(36, 36, 38, 0.1);
  transform: scale(0.95) translateY(12px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
  overflow: hidden;
  box-sizing: border-box;
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cookie-modal::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cookie-modal-backdrop.is-open .cookie-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.cookie-modal-header {
  padding: 24px 28px 18px 28px;
  /* border-bottom: 1px solid rgba(36, 36, 38, 0.08); */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  background: #ebeff5;
}

.cookie-modal-header-text {
  flex: 1;
}

.cookie-modal-title {
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 22px;
  font-weight: var(--text-title-weight, 500);
  color: var(--color-dark, #242426);
  margin: 0 0 6px 0;
  letter-spacing: var(--text-title-spacing, -0.04em);
  line-height: 1.25;
}

.cookie-modal-subtitle {
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 14.5px;
  line-height: var(--text-desc-line-height, 1.5);
  color: var(--text-desc-color, var(--color-dark-80, #242426bf));
  margin: 0;
  font-weight: var(--text-desc-weight, 400);
  letter-spacing: var(--text-desc-spacing, 0em);
}

.cookie-modal-close {
  background: transparent;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-dark-80, #242426bf);
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.cookie-modal-close:hover {
  background: rgba(36, 36, 38, 0.07);
  color: var(--color-dark, #242426);
}

.cookie-modal-close:focus-visible {
  outline: 2px solid rgb(219, 74, 43);
  outline-offset: 2px;
}

/* Modal Body */
.cookie-modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar IE & Edge */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  background: #ebeff5;
}

.cookie-modal-body::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Chrome/Safari/Brave */
  width: 0;
  height: 0;
}

.cookie-category-card {
  border: 1px solid rgba(36, 36, 38, 0.08);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(36, 36, 38, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

.cookie-category-card:hover {
  border-color: rgba(36, 36, 38, 0.18);
  box-shadow: 0 3px 8px rgba(36, 36, 38, 0.05);
}

.cookie-category-card.is-expanded {
  border-color: rgba(36, 36, 38, 0.18);
  box-shadow: 0 4px 12px rgba(36, 36, 38, 0.06);
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: background-color 0.15s ease;
}

.cookie-category-header:hover {
  background: rgba(36, 36, 38, 0.02);
}

.cookie-category-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.cookie-category-toggle-btn:focus-visible {
  outline: 2px solid rgb(219, 74, 43);
  outline-offset: 4px;
  border-radius: 4px;
}

.cookie-category-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark, #242426);
  opacity: 0.35;
  transition: transform 0.3s ease, opacity 0.3s ease;
  flex-shrink: 0;
}

.cookie-category-card:hover .cookie-category-icon {
  opacity: 0.75;
}

.cookie-category-card.is-expanded .cookie-category-icon {
  transform: rotate(45deg);
  opacity: 1;
  color: var(--color-dark, #242426);
}

.cookie-category-title {
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 17px;
  font-weight: var(--text-title-weight, 500);
  color: var(--color-dark, #242426);
  margin: 0;
  letter-spacing: var(--text-title-spacing, -0.04em);
  line-height: 1.35;
}

.cookie-category-action {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cookie-badge-always-active {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  letter-spacing: 0.01em;
  text-transform: none;
}

/* Accordion expandable body */
.cookie-category-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.cookie-category-card.is-expanded .cookie-category-body {
  max-height: 500px;
  opacity: 1;
}

.cookie-category-desc-inner {
  padding: 0 20px 20px 20px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .cookie-category-desc-inner {
    padding: 0 16px 16px 16px;
  }
}

.cookie-category-desc {
  font-family: var(--font-primary, 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-feature-settings: "cv11", "ss01";
  font-size: 15px;
  line-height: var(--text-desc-line-height, 1.55);
  color: var(--text-desc-color, var(--color-dark-80, #242426bf));
  margin: 0;
  letter-spacing: var(--text-desc-spacing, 0em);
  font-weight: var(--text-desc-weight, 400);
  border-top: 1px solid rgba(36, 36, 38, 0.07);
  padding-top: 14px;
}

/* ── 6. Accessible Toggle Switch ───────────────────────────────────── */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.cookie-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-toggle-input:checked+.cookie-toggle-slider {
  background-color: #000000;
}

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

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

.cookie-toggle-input:disabled+.cookie-toggle-slider::before {
  background-color: #9ca3af;
}

.cookie-toggle-input:focus-visible+.cookie-toggle-slider {
  outline: 2px solid rgb(219, 74, 43);
  outline-offset: 2px;
}

/* Modal Footer */
.cookie-modal-footer {
  padding: 16px 28px 20px 28px;
  /* border-top: 1px solid rgba(36, 36, 38, 0.08); */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: #ebeff5;
  box-sizing: border-box;
}

.cookie-modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-btn-dark {
  background: #000000;
  border: 1px solid #000000;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-btn-dark:hover {
  background: #242426;
  border-color: #242426;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.cookie-btn-dark:active {
  transform: translateY(0);
  background: #111111;
}

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

.sfooter-legal-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 0;
  font-size: 15px;
}

.sfooter-legal-links a,
.sfooter-cookie-btn {
  color: #7a7d8e;
  text-decoration: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: inherit;
  line-height: inherit;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.sfooter-legal-links a:hover,
.sfooter-legal-links a.is-active,
.sfooter-cookie-btn:hover {
  color: #14142d;
  text-decoration: none;
}

.sfooter-legal-sep {
  color: #cbd5e1;
  font-size: 11px;
  user-select: none;
}

.sfooter-cookie-btn:focus:not(:focus-visible) {
  outline: none;
}

.sfooter-cookie-btn:focus-visible {
  outline: 2px solid rgb(219, 74, 43);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 991px) {
  .sfooter-legal-links {
    justify-content: center;
    margin-bottom: 16px;
    text-align: center;
  }
}

/* ── 8. Responsive Design ──────────────────────────────────────────── */
@media (max-width: 992px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 14px 24px 22px 24px;
  }

  .cookie-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cookie-banner-actions .cookie-btn-primary {
    grid-column: span 2;
    order: -1;
    /* Place Accept All at top or bottom */
  }

  .cookie-modal {
    max-height: 92vh;
    border-radius: 16px;
  }

  .cookie-modal-header {
    padding: 20px 20px 16px 20px;
  }

  .cookie-modal-body {
    padding: 16px 20px;
  }

  .cookie-modal-footer {
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .cookie-modal-actions-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .cookie-modal-footer .cookie-btn-outline {
    width: 100%;
  }

  /* Cookie Modal Text Sizing - Tablet */
  .cookie-modal-title {
    font-size: 20px;
  }

  .cookie-modal-subtitle {
    font-size: 14px;
  }

  .cookie-category-title {
    font-size: 16px;
  }

  .cookie-badge-always-active {
    font-size: 11px;
  }

  .cookie-category-desc {
    font-size: 14px;
  }

  .cookie-modal-footer .cookie-btn {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .cookie-banner {
    border-radius: 20px 20px 0 0;
  }

  .cookie-banner-inner {
    padding: 12px 16px 18px 16px;
  }

  .cookie-banner-main {
    align-items: flex-start;
    gap: 14px;
  }

  .cookie-banner-icon-badge {
    width: 44px;
    height: 44px;
  }

  .cookie-banner-icon-badge svg {
    width: 22px;
    height: 22px;
  }

  .cookie-banner-title {
    font-size: 16px;
  }

  .cookie-banner-text {
    font-size: 13px;
  }

  .cookie-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .cookie-btn {
    width: 100%;
    height: 44px;
    /* Ensure 44px touch target on mobile */
  }

  .cookie-modal-actions-right {
    display: flex;
    flex-direction: column;
  }

  /* Cookie Modal Text Sizing - Mobile */
  .cookie-modal-title {
    font-size: 18px;
  }

  .cookie-modal-subtitle {
    font-size: 13px;
    line-height: 1.45;
  }

  .cookie-category-title {
    font-size: 15px;
  }

  .cookie-badge-always-active {
    font-size: 11px;
    padding: 2.5px 8px;
  }

  .cookie-category-desc {
    font-size: 13.5px;
    line-height: 1.5;
  }

  .cookie-modal-footer .cookie-btn {
    font-size: 13.5px;
  }
}

@media (max-width: 480px) {
  /* Cookie Modal Text Sizing - Small Mobile */
  .cookie-modal-title {
    font-size: 17px;
  }

  .cookie-modal-subtitle {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .cookie-category-title {
    font-size: 14px;
  }

  .cookie-badge-always-active {
    font-size: 10.5px;
    padding: 2px 7px;
  }

  .cookie-category-desc {
    font-size: 13px;
    line-height: 1.5;
  }

  .cookie-modal-footer .cookie-btn {
    font-size: 13px;
  }
}

/* ── 9. Prefers Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  .cookie-banner-wrapper,
  .cookie-banner-wrapper.is-dismissing,
  .cookie-modal-backdrop,
  .cookie-modal,
  .cookie-btn,
  .cookie-toggle-slider,
  .cookie-toggle-slider::before {
    transition: none !important;
  }
}