/* ==========================================================================
   Cookiebot Style Cookie Consent Banner, Inline Toggles, Modal & Trigger
   Sim Racing Nation Fanatec Portal - Compliant with GDPR, ePrivacy, CCPA
   Strict Rule: No Emojis, Clean Vector SVGs, Max Font Weight 600, Dark Theme
   ========================================================================== */

/* Floating Bottom Cookiebot Banner */
.cookie-banner-wrapper {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 960px;
  margin: 0 auto;
  z-index: 9999;
  display: none;
  animation: cookieSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookie-banner-card {
  background: #141923;
  border-radius: 4px;
  border-top: 3px solid var(--fanatec-brand, #e11d48);
  border-left: 1px solid #232a3b;
  border-right: 1px solid #232a3b;
  border-bottom: 1px solid #232a3b;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.72);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 840px) {
  .cookie-banner-card {
    padding: 22px 28px;
  }
}

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

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

.cookie-shield-icon {
  width: 24px;
  height: 24px;
  color: var(--fanatec-accent, #f43f5e);
  flex-shrink: 0;
}

.cookie-banner-title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
  margin: 0;
}

.cookie-banner-text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0;
}

.cookie-banner-text a {
  color: var(--fanatec-accent, #f43f5e);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Cookiebot Inline Category Checkboxes Bar */
.cookiebot-inline-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 14px;
  background: #0d1118;
  border: 1px solid #232a3b;
  border-radius: 4px;
}

@media (max-width: 680px) {
  .cookiebot-inline-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cookiebot-inline-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: #161c28;
  border: 1px solid #262f42;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
  user-select: none;
}

.cookiebot-inline-item.disabled {
  cursor: default;
  color: #94a3b8;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.btn-cookie {
  padding: 10px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 150ms ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-cookie-accept {
  background: linear-gradient(180deg, var(--fanatec-brand, #e11d48) 11%, var(--fanatec-accent, #f43f5e) 100%);
  color: #FFFFFF !important;
  border: none;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.32);
}

.btn-cookie-accept:hover {
  background: linear-gradient(180deg, #be123c 11%, #e11d48 100%);
  transform: translateY(-1px);
}

.btn-cookie-allow-selected {
  background-color: rgba(225, 29, 72, 0.14);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.42);
}

.btn-cookie-allow-selected:hover {
  background-color: rgba(225, 29, 72, 0.24);
  color: #ffffff;
}

.btn-cookie-decline {
  background-color: #1e2636;
  color: #e2e8f0;
  border: 1px solid #2e374d;
}

.btn-cookie-decline:hover {
  background-color: #273147;
  color: #ffffff;
}

.btn-cookie-settings {
  background-color: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
}

.btn-cookie-settings:hover {
  color: #f8fafc;
  background-color: #1a2130;
  border-color: #2e374d;
}

/* Unobtrusive Bottom-Left Cookiebot Floating Trigger Icon */
.cookie-floating-trigger {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9980;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: #151a24;
  border: 1px solid #2e374d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  color: var(--fanatec-accent, #f43f5e);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cookie-floating-trigger:hover {
  transform: translateY(-2px);
  border-color: var(--fanatec-accent, #f43f5e);
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35);
}

/* Settings Modal Dialog */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.80);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cookie-modal-dialog {
  background: #141923;
  border: 1px solid #262f42;
  border-radius: 4px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  padding: 28px;
  position: relative;
}

.cookie-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid #2e374d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  background: #1d2433;
  cursor: pointer;
  transition: all 150ms ease;
}

.cookie-modal-close:hover {
  background: #273147;
  color: #ffffff;
}

.cookie-modal-header {
  margin-bottom: 20px;
  padding-right: 36px;
}

.cookie-modal-title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.cookie-modal-subtitle {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* Category Checkbox Cards */
.cookie-category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cookie-category-card {
  border: 1px solid #232a3b;
  border-radius: 4px;
  padding: 16px;
  background: #0d1118;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cookie-category-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f8fafc;
}

.cookie-category-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fanatec-accent, #f43f5e);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cookie-category-desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

/* Custom Switch Toggle */
.cookie-toggle-label {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #2e374d;
  transition: 0.2s ease;
  border-radius: 4px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s ease;
  border-radius: 3px;
}

.cookie-toggle-label input:checked + .cookie-toggle-slider {
  background-color: var(--fanatec-brand, #e11d48);
}

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

.cookie-toggle-label input:disabled + .cookie-toggle-slider {
  opacity: 0.65;
  cursor: not-allowed;
}

.cookie-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #232a3b;
}
