/**
 * FixPro Cookie Consent Banner
 * GDPR-compliant cookie consent system
 * Colors: Navy #06121a, Blue #1e90ff, Gold #C9A052
 */

/* ═══════════════════════════════════════════════
   BANNER (bottom bar)
═══════════════════════════════════════════════ */

#cookieBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #06121a;
  color: #ffffff;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: slideUpBanner 0.2s ease-out;
  border-top: 2px solid #1e90ff;
}

@keyframes slideUpBanner {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
}

.cookie-banner-text a {
  color: #1e90ff;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
  color: #5bb3ff;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  min-height: 42px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.cookie-btn:hover {
  transform: translateY(-1px);
}

.cookie-btn:active {
  transform: translateY(0);
}

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

.cookie-btn-accept {
  background: linear-gradient(135deg, #e8c87a 0%, #C9A052 50%, #a07c3a 100%);
  color: #0A1128;
}

.cookie-btn-customize {
  background: transparent;
  color: #ffffff;
  border: 2px solid #1e90ff;
}

.cookie-btn-customize:hover {
  background: rgba(30, 144, 255, 0.1);
}

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

.cookie-btn-reject:hover {
  background: rgba(71, 85, 105, 0.2);
  color: #cbd5e1;
}

/* ═══════════════════════════════════════════════
   MODAL (customize settings)
═══════════════════════════════════════════════ */

.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 12, 26, 0.85);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal {
  background: #0A1128;
  color: #ffffff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUpModal 0.3s ease-out;
  border: 1px solid #1a2540;
}

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

.cookie-modal-header {
  padding: 24px;
  border-bottom: 1px solid #1a2540;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.cookie-modal-close:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #ffffff;
}

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

.cookie-modal-body {
  padding: 24px;
}

.cookie-category {
  margin-bottom: 20px;
  padding: 16px;
  background: #111829;
  border-radius: 8px;
  border: 1px solid #1a2540;
}

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

.cookie-category-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.cookie-category-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0;
}

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

.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: #475569;
  transition: 0.3s;
  border-radius: 26px;
}

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

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

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

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

.cookie-toggle input:focus-visible + .cookie-toggle-slider {
  outline: 3px solid #C9A052;
  outline-offset: 2px;
}

.cookie-always-active {
  font-size: 13px;
  color: #22c55e;
  font-weight: 600;
}

.cookie-modal-footer {
  padding: 24px;
  border-top: 1px solid #1a2540;
  display: flex;
  justify-content: flex-end;
}

.cookie-btn-save {
  background: linear-gradient(135deg, #e8c87a 0%, #C9A052 50%, #a07c3a 100%);
  color: #0A1128;
  padding: 12px 32px;
  min-height: 44px;
}

/* ═══════════════════════════════════════════════
   SETTINGS BUTTON (re-open modal)
═══════════════════════════════════════════════ */

#cookieSettingsBtn {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0A1128;
  color: #C9A052;
  border: 1px solid rgba(201, 160, 82, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 850;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#cookieSettingsBtn svg {
  width: 22px;
  height: 22px;
}

#cookieSettingsBtn:hover {
  transform: scale(1.08);
  background: #101a3a;
  box-shadow: 0 6px 22px rgba(201, 160, 82, .35);
}

#cookieSettingsBtn:active {
  transform: scale(1);
}

#cookieSettingsBtn:focus-visible {
  outline: 3px solid #C9A052;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  #cookieSettingsBtn { bottom: 28px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-modal {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }
}

/* Hidden utility */
[hidden] {
  display: none !important;
}
