/* ============================================================
   RUMBLE DIGITAL — COOKIE CONSENT & PREFERENCES DESIGN SYSTEM
   ============================================================ */

/* 1. COOKIE BANNER (Bottom Floating Card) */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: calc(100% - 48px);
  max-width: 480px;
  background-color: #0d0e13;
  color: #f0ede6;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 150000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Kurdis', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s;
}

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

.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cookie-banner-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(8, 68, 245, 0.14);
  border: 1px solid rgba(8, 68, 245, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(8, 68, 245, 0.2);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.cookie-banner:hover .cookie-banner-icon-wrap {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 0 28px rgba(8, 68, 245, 0.35);
}

.cookie-banner-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.cookie-svg-dough {
  fill: #4d7cff;
}

.cookie-svg-chip {
  fill: #ffffff;
}

.cookie-banner-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cookie-banner-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #4d7cff;
  background: rgba(8, 68, 245, 0.12);
  border: 1px solid rgba(8, 68, 245, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
  width: fit-content;
}

.cookie-banner-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
}

.cookie-banner-text {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.cookie-banner-text a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
  color: #0844f5;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

/* Button styles */
.cookie-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: none;
  outline: none;
  user-select: none;
}

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

.cookie-btn:active {
  transform: scale(0.97);
}

.cookie-btn-primary {
  background-color: #0844f5;
  color: #ffffff;
  flex: 1 1 120px;
}

.cookie-btn-primary:hover {
  background-color: #1a54ff;
}

.cookie-btn-secondary {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex: 1 1 120px;
}

.cookie-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-text {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  padding: 8px 12px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: 100%;
}

.cookie-btn-text:hover {
  color: #ffffff;
}

/* 2. PREFERENCES MODAL DIALOG */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 160000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cookie-modal {
  background: #0f1016;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  max-width: 580px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #ffffff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Kurdis', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

.cookie-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.cookie-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cookie-modal-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.cookie-modal-icon-wrap .cookie-banner-svg {
  width: 26px;
  height: 26px;
}

.cookie-modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.cookie-modal-subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.cookie-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

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

.cookie-options-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}

.cookie-option-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.cookie-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-option-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.cookie-badge-locked {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
}

.cookie-option-desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

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

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.25s;
  border-radius: 24px;
}

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

.cookie-switch input:checked + .cookie-slider {
  background-color: #0844f5;
}

.cookie-switch input:focus-visible + .cookie-slider {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

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

.cookie-switch input:disabled + .cookie-slider {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

.cookie-modal-footer .cookie-btn {
  flex: 1 1 calc(33.333% - 12px);
  min-width: 120px;
}

/* 3. FOOTER TRIGGER LINK */
.cookie-trigger-btn {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  display: inline;
}

.cookie-trigger-btn:hover {
  color: #0844f5;
  text-decoration: underline;
}

.cookie-trigger-btn:focus-visible {
  outline: 1px solid #0844f5;
  outline-offset: 2px;
}

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

.footer-bottom-right a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-right a:hover {
  color: #0844f5;
}

/* Mobile responsive adjustments — Compact & Non-Invasive */
@media (max-width: 600px) {
  .cookie-banner {
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    padding: 14px 16px;
    border-radius: 14px;
    gap: 10px;
    background-color: rgba(13, 14, 19, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.25);
  }

  .cookie-banner-header {
    gap: 10px;
  }

  .cookie-banner-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(8, 68, 245, 0.2);
  }

  .cookie-banner-svg {
    width: 17px;
    height: 17px;
  }

  .cookie-banner-badge {
    font-size: 8.5px;
    padding: 1px 5px;
  }

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

  .cookie-banner-text {
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
  }

  .cookie-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
  }

  .cookie-banner-actions .cookie-btn {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 34px;
  }

  .cookie-banner-actions .cookie-btn-primary {
    flex: unset;
    width: 100%;
  }

  .cookie-banner-actions .cookie-btn-secondary {
    flex: unset;
    width: 100%;
  }

  .cookie-banner-actions .cookie-btn-text {
    grid-column: 1 / -1;
    width: 100%;
    padding: 3px 6px;
    font-size: 10.5px;
    text-align: center;
  }

  .cookie-modal {
    padding: 20px 16px;
    max-height: 88vh;
    border-radius: 16px;
    gap: 16px;
  }

  .cookie-modal-title {
    font-size: 18px;
  }

  .cookie-modal-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .cookie-modal-icon-wrap .cookie-banner-svg {
    width: 20px;
    height: 20px;
  }

  .cookie-option-card {
    padding: 14px;
  }

  .cookie-option-name {
    font-size: 13.5px;
  }

  .cookie-option-desc {
    font-size: 11.5px;
  }

  .cookie-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
    flex: 1 1 100%;
    padding: 10px;
    font-size: 12.5px;
  }
}
