/**
 * SimCzech Cookie Consent (CMP) — Styles
 * Dark theme, glass-morphism design matching SimCzech brand
 */

/* ── Cookie Banner (bottom bar) ─────────────────────────────── */
.sc-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(240, 180, 41, 0.2);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
  padding: 20px 24px;
  animation: sc-cookie-slide-up 0.4s ease-out;
}

@keyframes sc-cookie-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sc-cookie-banner--hidden {
  animation: sc-cookie-slide-down 0.4s ease-in forwards;
}

@keyframes sc-cookie-slide-down {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

.sc-cookie-banner__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.sc-cookie-banner__text {
  flex: 1;
  min-width: 280px;
}

.sc-cookie-banner__text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #f0b429;
  margin: 0 0 6px;
}

.sc-cookie-banner__text p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.8);
  margin: 0 0 4px;
}

.sc-cookie-banner__link {
  color: #f0b429;
  text-decoration: underline;
  font-size: 0.8rem;
}

.sc-cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Buttons ────────────────────────────────────────────────── */
.sc-cookie-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.sc-cookie-btn--accept {
  background: #f0b429;
  color: #0f172a;
}

.sc-cookie-btn--accept:hover {
  background: #f5c842;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 180, 41, 0.3);
}

.sc-cookie-btn--reject {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sc-cookie-btn--reject:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.sc-cookie-btn--settings {
  background: transparent;
  color: rgba(226, 232, 240, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-cookie-btn--settings:hover {
  color: #f0b429;
  border-color: rgba(240, 180, 41, 0.3);
}

/* ── Settings Panel (modal) ─────────────────────────────────── */
.sc-cookie-settings {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
}

.sc-cookie-settings--visible {
  display: flex;
}

.sc-cookie-settings__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  animation: sc-cookie-fade-in 0.3s ease;
}

@keyframes sc-cookie-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sc-cookie-settings__panel {
  position: relative;
  z-index: 1;
  background: rgba(30, 41, 59, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(240, 180, 41, 0.15);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: sc-cookie-panel-in 0.3s ease;
}

@keyframes sc-cookie-panel-in {
  from { transform: scale(0.95) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.sc-cookie-settings__panel h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 20px;
}

.sc-cookie-settings__group {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-cookie-settings__group:last-of-type {
  border-bottom: none;
}

.sc-cookie-settings__desc {
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.6);
  line-height: 1.4;
  margin: 6px 0 0;
}

.sc-cookie-settings__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* ── Toggle Switch ──────────────────────────────────────────── */
.sc-cookie-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.sc-cookie-toggle input {
  display: none;
}

.sc-cookie-toggle__slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.sc-cookie-toggle__slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(226, 232, 240, 0.8);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.sc-cookie-toggle input:checked + .sc-cookie-toggle__slider {
  background: rgba(240, 180, 41, 0.3);
}

.sc-cookie-toggle input:checked + .sc-cookie-toggle__slider::after {
  transform: translateX(20px);
  background: #f0b429;
}

.sc-cookie-toggle input:disabled + .sc-cookie-toggle__slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.sc-cookie-toggle__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sc-cookie-banner {
    padding: 16px;
  }

  .sc-cookie-banner__content {
    flex-direction: column;
    gap: 12px;
  }

  .sc-cookie-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .sc-cookie-btn {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
  }

  .sc-cookie-settings__panel {
    padding: 24px 20px;
    margin: 12px;
  }
}

/* ── Footer cookie settings link ────────────────────────────── */
.sc-cookie-settings-link {
  cursor: pointer;
  color: rgba(226, 232, 240, 0.6);
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.sc-cookie-settings-link:hover {
  color: #f0b429;
}
