/* Cookie banner & modal styles */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 1000;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(15,15,20,.22), 0 2px 8px rgba(15,15,20,.08);
  border: 1px solid #ececef;
  max-width: 980px;
  margin: 0 auto;
  font-family: 'Manrope', system-ui, sans-serif;
  animation: cookieIn .4s ease;
}
@keyframes cookieIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.cookie-banner-inner {
  padding: 22px 26px;
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner-text { flex: 1; min-width: 260px; }
.cookie-banner-text h3 {
  margin: 0 0 6px; font-size: 16px; font-weight: 800;
  color: #682B68;
}
.cookie-banner-text p {
  margin: 0; font-size: 13.5px; line-height: 1.5; color: #29292f;
}
.cookie-banner-text a { color: #682B68; font-weight: 700; text-decoration: underline; }

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

.cookie-btn {
  padding: 10px 18px; border-radius: 6px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; border: 0;
  letter-spacing: 0.02em;
  transition: transform .12s, background .12s;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn-primary { background: #E16D51; color: #fff; }
.cookie-btn-primary:hover { background: #c75636; }
.cookie-btn-secondary { background: #f4f4f6; color: #0a0a0a; }
.cookie-btn-secondary:hover { background: #ebebef; }

/* Reopen button */
.cookie-reopen {
  position: fixed; right: 18px; bottom: 18px;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 1px solid #ececef;
  box-shadow: 0 4px 14px rgba(15,15,20,.12);
  font-size: 22px; cursor: pointer;
  z-index: 999;
  display: grid; place-items: center;
  transition: transform .15s;
}
.cookie-reopen:hover { transform: scale(1.08); }

/* Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1100;
  display: grid; place-items: center;
}
.cookie-modal[hidden] { display: none; }
.cookie-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.cookie-modal-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 92%; max-width: 720px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  overflow: hidden;
  font-family: 'Manrope', system-ui, sans-serif;
}
.cookie-modal-head {
  padding: 22px 28px;
  border-bottom: 1px solid #ececef;
  display: flex; justify-content: space-between; align-items: center;
}
.cookie-modal-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: #682B68; }
.cookie-modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f4f4f6; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; display: grid; place-items: center;
}
.cookie-modal-close:hover { background: #ebebef; }
.cookie-modal-body {
  flex: 1; overflow-y: auto;
  padding: 20px 28px;
}
.cookie-modal-intro {
  font-size: 13.5px; line-height: 1.5; color: #6b6b72;
  background: #fafafa; padding: 14px 16px; border-radius: 8px;
  margin: 0 0 20px;
}

.cookie-cat {
  border: 1px solid #ececef; border-radius: 8px;
  margin-bottom: 10px; overflow: hidden;
  background: #fff;
}
.cookie-cat summary {
  padding: 16px 18px; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  font-weight: 700; font-size: 14px;
  list-style: none;
  user-select: none;
}
.cookie-cat summary::-webkit-details-marker { display: none; }
.cookie-cat .cc-toggle { display: inline-flex; align-items: center; }
.cookie-cat .cc-title { flex: 1; }
.cookie-cat .cc-arrow {
  font-size: 20px; color: #9a9aa1;
  transition: transform .2s;
}
.cookie-cat[open] .cc-arrow { transform: rotate(90deg); }

.cc-locked {
  font-size: 11px; font-weight: 700; color: #16a34a;
  background: rgba(22,163,74,.1); padding: 4px 10px; border-radius: 999px;
}

/* Toggle switch (matches admin switch) */
.cc-switch { display: inline-flex; cursor: pointer; }
.cc-switch input { display: none; }
.cc-switch span {
  display: inline-block;
  width: 38px; height: 22px;
  background: #d4d4d9; border-radius: 999px;
  position: relative; transition: background .2s;
}
.cc-switch span::after {
  content: ""; position: absolute;
  top: 2px; left: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cc-switch input:checked + span { background: #16a34a; }
.cc-switch input:checked + span::after { transform: translateX(16px); }

.cc-body {
  padding: 0 18px 18px;
  font-size: 13px; line-height: 1.55; color: #29292f;
  border-top: 1px solid #ececef;
}
.cc-body p { margin: 14px 0; }

.cookie-table {
  width: 100%; border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 12px;
}
.cookie-table th {
  text-align: left; padding: 8px 10px;
  background: #fafafa;
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #6b6b72;
  border-bottom: 1px solid #ececef;
}
.cookie-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #ececef;
  vertical-align: top;
}
.cookie-table tr:last-child td { border-bottom: 0; }
.cookie-table code {
  background: #f4f4f6; padding: 2px 6px; border-radius: 3px;
  font-size: 11.5px;
}

.cookie-modal-foot {
  padding: 18px 28px;
  border-top: 1px solid #ececef;
  display: flex; gap: 8px; justify-content: flex-end;
  flex-wrap: wrap;
  background: #fafafa;
}

@media (max-width: 720px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { flex-direction: column; }
  .cookie-btn { width: 100%; }
  .cookie-modal-foot { flex-direction: column; }
  .cookie-table { font-size: 11.5px; }
}
