/* ============================================================
   LONGDON FOODS — LUXURY COOKIE CONSENT SYSTEM
   Dark editorial aesthetic matching SWB theme
   ============================================================ */

/* ── Floating Banner Container ────────────────────────────── */
.lf-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99999;
  max-width: 440px;
  width: calc(100% - 48px);
  background: rgba(16, 24, 32, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lf-cookie-banner.lf-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header with Icon */
.lf-cookie-banner__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lf-cookie-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(247, 243, 58, 0.12);
  border: 1px solid rgba(247, 243, 58, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7f33a;
  flex-shrink: 0;
}

.lf-cookie-banner__title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.01em;
}

.lf-cookie-banner__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 20px 0;
}

.lf-cookie-banner__desc a {
  color: #f7f33a;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.lf-cookie-banner__desc a:hover {
  opacity: 0.8;
}

/* Actions Row */
.lf-cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lf-cookie-banner__btns-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lf-cookie-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
}

.lf-cookie-btn--primary {
  background: #f7f33a;
  color: #101820;
}

.lf-cookie-btn--primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(247, 243, 58, 0.25);
}

.lf-cookie-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lf-cookie-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.lf-cookie-btn--link {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  border: none;
  transition: color 0.2s;
  align-self: center;
}

.lf-cookie-btn--link:hover {
  color: #f7f33a;
}

/* ── Re-open Cookie Trigger (Bottom Right Floating Pin) ────── */
.lf-cookie-reopen-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(16, 24, 32, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f7f33a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

.lf-cookie-reopen-btn.lf-show {
  opacity: 1;
  pointer-events: auto;
}

.lf-cookie-reopen-btn:hover {
  transform: scale(1.1);
  background: #101820;
  border-color: #f7f33a;
}

/* ── Modal Backdrop ────────────────────────────────────────── */
.lf-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lf-cookie-modal-backdrop.lf-show {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal Box ─────────────────────────────────────────────── */
.lf-cookie-modal {
  background: #151d27;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ffffff;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lf-cookie-modal-backdrop.lf-show .lf-cookie-modal {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.lf-cookie-modal__header {
  padding: 24px 24px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lf-cookie-modal__title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}

.lf-cookie-modal__close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lf-cookie-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Modal Body / Scrollable */
.lf-cookie-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lf-cookie-modal__intro {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Category Item Card */
.lf-cookie-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lf-cookie-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lf-cookie-group__name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.lf-cookie-group__desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Toggle Switch */
.lf-cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.lf-cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.16);
  transition: 0.3s;
  border-radius: 34px;
}

.lf-cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.lf-cookie-toggle input:checked + .lf-cookie-slider {
  background-color: #f7f33a;
}

.lf-cookie-toggle input:checked + .lf-cookie-slider:before {
  transform: translateX(20px);
  background-color: #101820;
}

.lf-cookie-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(247, 243, 58, 0.15);
  color: #f7f33a;
  padding: 4px 10px;
  border-radius: 50px;
}

/* Modal Footer */
.lf-cookie-modal__footer {
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .lf-cookie-banner {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    padding: 20px;
  }

  .lf-cookie-banner__btns-main {
    grid-template-columns: 1fr;
  }

  .lf-cookie-reopen-btn {
    bottom: 16px;
    left: 16px;
  }

  .lf-cookie-modal {
    border-radius: 20px;
  }

  .lf-cookie-modal__footer {
    flex-direction: column-reverse;
  }

  .lf-cookie-modal__footer .lf-cookie-btn {
    width: 100%;
  }
}
