/* ═══════════════════════════════════════════════════════════════
   THE PATTERN BISTRO — cookies.css
   Cookie consent banner styles
   GDPR-compliant: minimal, clear, not dark-pattern
═══════════════════════════════════════════════════════════════ */

/* ── BANNER ──────────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #2C2420;
  border-top: 2px solid #C24A24;
  padding: 1.25rem clamp(1.5rem, 5vw, 3rem);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
}

#cookie-banner.visible {
  transform: translateY(0);
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

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

.cookie-text p {
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(250,248,244,0.75);
  line-height: 1.65;
  margin: 0;
}

.cookie-text a {
  color: #C24A24;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-text a:hover {
  color: #d4603a;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cookie-btn {
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  border-radius: 0;
}

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

.cookie-btn-accept {
  background: #C24A24;
  color: #FAF8F4;
  border-color: #C24A24;
}
.cookie-btn-accept:hover { background: #9e3a1a; border-color: #9e3a1a; }

.cookie-btn-reject {
  background: transparent;
  color: rgba(250,248,244,0.6);
  border-color: rgba(250,248,244,0.2);
}
.cookie-btn-reject:hover {
  color: rgba(250,248,244,0.9);
  border-color: rgba(250,248,244,0.45);
}

.cookie-btn-settings {
  background: transparent;
  color: rgba(250,248,244,0.45);
  border-color: transparent;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.7rem;
}
.cookie-btn-settings:hover { color: rgba(250,248,244,0.75); }

/* ── SETTINGS MODAL ──────────────────────────────────────────── */
#cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(44,36,32,0.7);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#cookie-modal.open {
  display: flex;
}

.cookie-modal-box {
  background: #FAF8F4;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.cookie-modal-header h2 {
  font-family: 'Lobster Two', cursive;
  font-size: 1.4rem;
  font-weight: 400;
  color: #2C2420;
  line-height: 1.2;
}

.cookie-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #8A8078;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.cookie-modal-close:hover { color: #C24A24; }

.cookie-modal-desc {
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #5C5449;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ── TOGGLE ROWS ─────────────────────────────────────────────── */
.cookie-category {
  border-top: 1px solid #E8E2D8;
  padding: 1rem 0;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.cookie-category-title {
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2C2420;
}

.cookie-category-desc {
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: #8A8078;
  line-height: 1.6;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

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

.cookie-toggle-track {
  position: absolute;
  inset: 0;
  background: #D1C9BC;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s;
}

.cookie-toggle input:checked + .cookie-toggle-track {
  background: #C24A24;
}

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

.cookie-toggle-track::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(18px);
}

/* Modal footer */
.cookie-modal-footer {
  border-top: 1px solid #E8E2D8;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cookie-btn-save {
  background: #C24A24;
  color: #FAF8F4;
  border-color: #C24A24;
}
.cookie-btn-save:hover { background: #9e3a1a; }

/* ── SMALL REOPEN BUTTON ─────────────────────────────────────── */
#cookie-reopen {
  position: fixed;
  bottom: 1.2rem;
  left: 1.2rem;
  z-index: 9000;
  background: #2C2420;
  color: rgba(250,248,244,0.6);
  border: 1px solid rgba(250,248,244,0.15);
  font-family: 'Ubuntu', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  display: none;
  transition: color 0.2s, border-color 0.2s;
}

#cookie-reopen:hover {
  color: #C24A24;
  border-color: #C24A24;
}

#cookie-reopen.visible { display: block; }

@media (max-width: 600px) {
  .cookie-inner { gap: 1rem; }
  .cookie-actions { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
  .cookie-btn-settings { flex: 100%; text-align: center; }
  #cookie-reopen { bottom: 0.8rem; left: 0.8rem; }
}
