/* ══════════════════════════════════════════════════════════
   COOKIE BANNER — Glamping Labe
══════════════════════════════════════════════════════════ */

/* ── Banner wrapper ── */
#gl-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9999;
  width: calc(100vw - 48px);
  max-width: 780px;
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
}
#gl-cookie-banner.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── Karta ── */
.gl-cookie-card {
  background: rgba(15, 17, 24, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.55),
              0 1px 0 rgba(255,255,255,0.05) inset;
  overflow: hidden;
}

/* ── Hlavní řádek ── */
.gl-cookie-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  flex-wrap: wrap;
}
.gl-cookie-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(184, 64, 53, 0.12);
  border: 1px solid rgba(184, 64, 53, 0.22);
  display: flex; align-items: center; justify-content: center;
  color: #b84035;
  flex-shrink: 0;
}
.gl-cookie-text { flex: 1; min-width: 180px; }
.gl-cookie-title {
  font-size: 0.88rem; font-weight: 700;
  color: rgba(255,255,255,0.88);
  letter-spacing: -0.01em; margin-bottom: 3px;
}
.gl-cookie-desc {
  font-size: 0.75rem; color: rgba(255,255,255,0.45);
  line-height: 1.55;
}
.gl-cookie-desc a {
  color: #2496d8; text-decoration: none;
}
.gl-cookie-desc a:hover { text-decoration: underline; }

/* ── Tlačítka (hlavní) ── */
.gl-cookie-actions {
  display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; align-items: center;
}
.gl-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.80rem; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; border: none; white-space: nowrap;
  transition: filter 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.gl-btn:focus-visible { outline: 2px solid #b84035; outline-offset: 3px; }
.gl-btn:active { transform: scale(0.97); }

.gl-btn-accept {
  background: #b84035; color: #fff;
  box-shadow: 0 4px 16px rgba(184,64,53,0.35);
}
.gl-btn-accept:hover { filter: brightness(1.12); transform: translateY(-1px); }

.gl-btn-necessary {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
}
.gl-btn-necessary:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.88); }

.gl-btn-settings {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.45);
  padding: 0 12px;
}
.gl-btn-settings:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.gl-btn-settings svg { transition: transform 0.3s ease; }
.gl-btn-settings.is-open svg { transform: rotate(180deg); }

/* ── Panel s detailním nastavením ── */
.gl-cookie-detail {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1),
              padding 0.4s cubic-bezier(0.4,0,0.2,1);
}
.gl-cookie-detail.is-open {
  max-height: 400px;
  padding: 18px 20px 20px;
}

/* ── Toggle řádky ── */
.gl-toggle-row {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gl-toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.gl-toggle-info { flex: 1; }
.gl-toggle-name {
  font-size: 0.83rem; font-weight: 700;
  color: rgba(255,255,255,0.88); margin-bottom: 3px;
  display: flex; align-items: center; gap: 8px;
}
.gl-toggle-desc {
  font-size: 0.74rem; color: rgba(255,255,255,0.40); line-height: 1.55;
}
.gl-badge {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 7px;
  border-radius: 999px; font-size: 0.60rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.gl-badge-req      { background: rgba(90,170,90,0.12); color: #7dc97d; border: 1px solid rgba(90,170,90,0.22); }
.gl-badge-analytics { background: rgba(36,150,216,0.12); color: #5ab4e8; border: 1px solid rgba(36,150,216,0.22); }
.gl-badge-marketing { background: rgba(220,160,40,0.12); color: #e0b84a; border: 1px solid rgba(220,160,40,0.22); }

/* ── Toggle switch ── */
.gl-toggle {
  position: relative; width: 40px; height: 22px; flex-shrink: 0; margin-top: 2px;
}
.gl-toggle input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.gl-toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px; cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.gl-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%; background: rgba(255,255,255,0.5);
  left: 2px; top: 2px;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), background 0.25s ease;
}
.gl-toggle input:checked + .gl-toggle-slider {
  background: #b84035; border-color: #b84035;
}
.gl-toggle input:checked + .gl-toggle-slider::before {
  transform: translateX(18px); background: #fff;
}
.gl-toggle input:disabled + .gl-toggle-slider {
  opacity: 0.5; cursor: not-allowed;
}
.gl-toggle input:focus-visible + .gl-toggle-slider {
  outline: 2px solid #b84035; outline-offset: 2px;
}

/* ── Uložit nastavení tlačítko ── */
.gl-detail-footer {
  display: flex; justify-content: flex-end;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 6px;
}
.gl-btn-save {
  background: #b84035; color: #fff;
  box-shadow: 0 4px 16px rgba(184,64,53,0.3);
  height: 34px; padding: 0 18px;
  font-size: 0.78rem;
}
.gl-btn-save:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ── Responsive ── */
@media (max-width: 600px) {
  #gl-cookie-banner { width: calc(100vw - 24px); bottom: 12px; }
  .gl-cookie-main { padding: 14px 16px; gap: 12px; }
  .gl-cookie-actions { width: 100%; }
  .gl-btn-accept, .gl-btn-necessary { flex: 1; justify-content: center; }
  .gl-cookie-detail.is-open { max-height: 500px; }
  .gl-cookie-detail { padding-left: 16px; padding-right: 16px; }
}
