/* ============================================================
   Pantry Love Cookie Consent — Banner + Modal Styles
   Palette: --green-deep #3D4A1F, --green-mid #6B7B3A,
            --green-light #95A84C, --green-pale #D4E09E,
            --orange-warm #E07B5B, --cream #FFFBF5
   ============================================================ */

/* ─── Banner ──────────────────────────────────────────────── */
#pl-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #FFFBF5;
  border-top: 2px solid #D4E09E;
  box-shadow: 0 -4px 24px rgba(61, 74, 31, 0.12);
  padding: 16px 24px;
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.pl-cb-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.pl-cb-text {
  flex: 1;
  min-width: 240px;
}

.pl-cb-title {
  font-size: 15px;
  font-weight: 700;
  color: #3D4A1F;
  margin: 0 0 4px;
}

.pl-cb-desc {
  font-size: 13px;
  color: #4a5568;
  margin: 0;
  line-height: 1.5;
}

.pl-cb-link {
  color: #6B7B3A;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pl-cb-link:hover {
  color: #3D4A1F;
}

.pl-cb-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ─── Shared Button Styles ───────────────────────────────── */
.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.pl-btn:focus-visible {
  outline: 3px solid #95A84C;
  outline-offset: 2px;
}

.pl-btn-primary {
  background: #6B7B3A;
  color: #ffffff;
  border-color: #6B7B3A;
}

.pl-btn-primary:hover {
  background: #3D4A1F;
  border-color: #3D4A1F;
}

.pl-btn-outline {
  background: transparent;
  color: #6B7B3A;
  border-color: #6B7B3A;
}

.pl-btn-outline:hover {
  background: #F2F5E0;
  color: #3D4A1F;
  border-color: #3D4A1F;
}

.pl-btn-ghost {
  background: transparent;
  color: #6B7B3A;
  border-color: transparent;
  padding-left: 6px;
  padding-right: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
  border-radius: 6px;
}

.pl-btn-ghost:hover {
  color: #3D4A1F;
  background: #F2F5E0;
}

/* ─── Modal Overlay ──────────────────────────────────────── */
#pl-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(15, 36, 25, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

#pl-cookie-modal.pl-modal-visible {
  opacity: 1;
}

.pl-modal-box {
  background: #FFFBF5;
  border-radius: 16px;
  box-shadow: 0 20px 64px rgba(61, 74, 31, 0.22);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#pl-cookie-modal.pl-modal-visible .pl-modal-box {
  transform: scale(1) translateY(0);
}

.pl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #D4E09E;
}

.pl-modal-title {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #3D4A1F;
  margin: 0;
}

.pl-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #718096;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.pl-modal-close:hover {
  background: #F2F5E0;
  color: #3D4A1F;
}

.pl-modal-close:focus-visible {
  outline: 3px solid #95A84C;
  outline-offset: 2px;
}

.pl-modal-body {
  padding: 20px 24px;
  flex: 1;
}

.pl-modal-intro {
  font-size: 13px;
  color: #4a5568;
  margin: 0 0 20px;
  line-height: 1.55;
}

/* ─── Preference Rows ────────────────────────────────────── */
.pl-pref-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #e8e8f0;
}

.pl-pref-row:last-child {
  border-bottom: none;
}

.pl-pref-info {
  flex: 1;
}

.pl-pref-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #3D4A1F;
  margin-bottom: 4px;
}

.pl-pref-info p {
  font-size: 12px;
  color: #718096;
  margin: 0;
  line-height: 1.5;
}

/* ─── Toggle Switch ──────────────────────────────────────── */
.pl-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

.pl-toggle input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.pl-toggle-slider {
  position: relative;
  width: 44px;
  height: 24px;
  background: #cbd5e0;
  border-radius: 12px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.pl-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.pl-toggle input:checked + .pl-toggle-slider {
  background: #6B7B3A;
}

.pl-toggle input:checked + .pl-toggle-slider::after {
  transform: translateX(20px);
}

.pl-toggle input:focus-visible + .pl-toggle-slider {
  outline: 3px solid #95A84C;
  outline-offset: 2px;
}

/* Locked "Always On" toggle */
.pl-toggle-locked {
  cursor: default;
  pointer-events: none;
}

.pl-toggle-on-label {
  font-size: 11px;
  font-weight: 700;
  color: #6B7B3A;
  background: #F2F5E0;
  border: 1.5px solid #D4E09E;
  border-radius: 100px;
  padding: 4px 10px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ─── Modal Footer ───────────────────────────────────────── */
.pl-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid #D4E09E;
  flex-wrap: wrap;
}

/* ─── Cookie Settings footer link ────────────────────────── */
a[data-pl-cookie-settings],
button[data-pl-cookie-settings] {
  cursor: pointer;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  #pl-cookie-banner {
    padding: 16px;
  }

  .pl-cb-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .pl-cb-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .pl-btn-ghost {
    order: -1;
    width: 100%;
    text-align: left;
    padding-left: 0;
  }

  .pl-modal-footer {
    flex-direction: column-reverse;
  }

  .pl-modal-footer .pl-btn {
    width: 100%;
  }
}
