/* LaCarte.live — Cookie Consent Banner styles
   Mounted both on landing (public/index.html) and inside the SPA.
   Uses the same brand palette as landing/legal pages. */

.lc-cb-root { all: initial; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.lc-cb-root *, .lc-cb-root *::before, .lc-cb-root *::after { box-sizing: border-box; }

/* ───── Banner (bottom bar) ───── */
.lc-cb-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 56rem;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 8px 16px rgba(0,0,0,0.08);
  padding: 1.25rem 1.5rem;
  z-index: 2147483600;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  animation: lc-cb-slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lc-cb-slide-up {
  from { transform: translateY(120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.lc-cb-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.lc-cb-banner-body {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.5;
}
.lc-cb-banner-body strong { color: #111827; font-weight: 700; }
.lc-cb-banner-body a {
  color: #f97316;
  text-decoration: underline;
  font-weight: 600;
}
.lc-cb-banner-body a:hover { color: #ea580c; }

.lc-cb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lc-cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.lc-cb-btn-primary {
  background: #f97316;
  color: #ffffff;
}
.lc-cb-btn-primary:hover { background: #ea580c; }
.lc-cb-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}
.lc-cb-btn-secondary:hover { background: #e5e7eb; }
.lc-cb-btn-ghost {
  background: transparent;
  color: #6b7280;
  text-decoration: underline;
}
.lc-cb-btn-ghost:hover { color: #374151; }

@media (max-width: 720px) {
  .lc-cb-banner {
    grid-template-columns: 1fr;
    padding: 1rem 1.1rem;
  }
  .lc-cb-actions { width: 100%; }
  .lc-cb-actions .lc-cb-btn { flex: 1; min-width: 0; padding: 0.55rem 0.5rem; font-size: 0.8rem; }
}

/* ───── Modal (granular preferences) ───── */
.lc-cb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.6);
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: lc-cb-fade-in 0.2s ease;
}
@keyframes lc-cb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lc-cb-modal {
  background: #ffffff;
  border-radius: 1rem;
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  animation: lc-cb-scale-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lc-cb-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.lc-cb-modal-header {
  padding: 1.5rem 1.5rem 0.5rem;
}
.lc-cb-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.25rem;
}
.lc-cb-modal-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

.lc-cb-modal-body {
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lc-cb-cat {
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  padding: 1rem 1.1rem;
}
.lc-cb-cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.lc-cb-cat-name {
  font-weight: 700;
  color: #111827;
  font-size: 0.95rem;
}
.lc-cb-cat-desc {
  color: #4b5563;
  font-size: 0.8rem;
  line-height: 1.5;
}
.lc-cb-cat-required {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #16a34a;
  background: #dcfce7;
  padding: 0.15rem 0.55rem;
  border-radius: 0.25rem;
}

/* iOS-style toggle */
.lc-cb-toggle {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.4rem;
  flex-shrink: 0;
}
.lc-cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.lc-cb-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 1rem;
  transition: background 0.2s;
}
.lc-cb-toggle-slider::before {
  content: '';
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  left: 0.15rem;
  bottom: 0.15rem;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lc-cb-toggle input:checked + .lc-cb-toggle-slider { background: #f97316; }
.lc-cb-toggle input:checked + .lc-cb-toggle-slider::before { transform: translateX(1.1rem); }
.lc-cb-toggle input:disabled + .lc-cb-toggle-slider { opacity: 0.7; cursor: not-allowed; }

.lc-cb-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.lc-cb-modal-footer .lc-cb-btn { width: 100%; }
@media (min-width: 480px) {
  .lc-cb-modal-footer { flex-direction: row; }
  .lc-cb-modal-footer .lc-cb-btn { flex: 1; }
}
