/* ── Cookie consent banner & panel ───────────────────────────────────────── */

/* Banner */
#lj-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1C2D2E;
  color: #FAF8F5;
  z-index: 10000;
  padding: 20px 32px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
}

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

.lj-cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.lj-cookie-banner-text {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(250,248,245,0.8);
  min-width: 200px;
}

.lj-cookie-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Overlay */
#lj-cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(28,28,26,0.55);
  z-index: 10001;
  backdrop-filter: blur(2px);
}

#lj-cookie-overlay.lj-visible {
  display: block;
}

/* Panel */
#lj-cookie-panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10002;
  background-color: #FAF8F5;
  border-radius: 4px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

#lj-cookie-panel.lj-visible {
  display: block;
}

body.lj-panel-open {
  overflow: hidden;
}

.lj-panel-inner {
  display: flex;
  flex-direction: column;
}

.lj-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid #E3DDD7;
}

.lj-panel-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #1C1C1A;
}

.lj-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #5A5A58;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.lj-panel-close:hover {
  color: #1C1C1A;
}

.lj-panel-body {
  padding: 8px 28px;
}

.lj-cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #E3DDD7;
}

.lj-cookie-row:last-child {
  border-bottom: none;
}

.lj-cookie-row-info {
  flex: 1;
}

.lj-cookie-row-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1C1C1A;
  margin-bottom: 4px;
}

.lj-cookie-row-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #5A5A58;
}

/* Toggle */
.lj-toggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

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

.lj-toggle-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #E3DDD7;
  border-radius: 12px;
  transition: background-color 0.2s;
}

.lj-toggle-input:checked + .lj-toggle-track {
  background-color: #1C2D2E;
}

.lj-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: #fff;
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.lj-toggle-input:checked + .lj-toggle-track .lj-toggle-thumb {
  left: 23px;
}

.lj-toggle-input:focus-visible + .lj-toggle-track {
  outline: 2px solid #F2799E;
  outline-offset: 2px;
}

.lj-toggle-always-on {
  cursor: default;
}

.lj-toggle-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #5A5A58;
  white-space: nowrap;
}

.lj-panel-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px 28px 24px;
  border-top: 1px solid #E3DDD7;
}

/* Buttons */
.lj-btn {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.lj-btn-accept {
  background-color: #F2799E;
  color: #fff;
}

.lj-btn-accept:hover {
  opacity: 0.88;
}

.lj-btn-reject {
  background-color: transparent;
  color: rgba(250,248,245,0.7);
  border: 1px solid rgba(250,248,245,0.3);
}

.lj-btn-reject:hover {
  color: #FAF8F5;
  border-color: rgba(250,248,245,0.7);
}

.lj-btn-ghost {
  background-color: transparent;
  color: rgba(250,248,245,0.7);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding-left: 4px;
  padding-right: 4px;
}

.lj-btn-ghost:hover {
  color: #FAF8F5;
}

.lj-btn-sm {
  font-size: 13px;
  padding: 8px 16px;
}

/* Ghost inside panel (light background) */
.lj-panel-footer .lj-btn-ghost {
  color: #5A5A58;
}

.lj-panel-footer .lj-btn-ghost:hover {
  color: #1C1C1A;
}

/* Floating settings button (pages without footer cookie-settings link) */
#lj-floating-settings {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #5A5A58;
  background-color: #FAF8F5;
  border: 1px solid rgba(28,45,46,0.2);
  border-radius: 20px;
  padding: 6px 13px;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

#lj-floating-settings.lj-visible {
  display: block;
}

#lj-floating-settings:hover {
  background-color: #1C2D2E;
  color: #FAF8F5;
  border-color: #1C2D2E;
}

#lj-floating-settings:focus-visible {
  outline: 2px solid #F2799E;
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 600px) {
  #lj-cookie-banner {
    padding: 16px 20px;
  }

  .lj-cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .lj-cookie-banner-actions {
    width: 100%;
  }

  .lj-btn-ghost {
    order: 3;
    width: 100%;
    text-align: center;
    padding: 8px 0;
  }

  .lj-btn-reject {
    flex: 1;
  }

  .lj-btn-accept {
    flex: 1;
  }

  #lj-cookie-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    max-width: 100%;
    border-radius: 4px 4px 0 0;
    max-height: 85vh;
  }

  .lj-panel-footer {
    flex-direction: column-reverse;
  }

  .lj-panel-footer .lj-btn {
    width: 100%;
    text-align: center;
  }

  #lj-floating-settings {
    bottom: 16px;
    right: 12px;
    font-size: 11px;
    padding: 5px 11px;
  }
}
