/* ============================================================
   JMFC Cookie Consent  —  cookie-consent.css
   navy #1B263B | teal #26A69A | white #FFF
   ============================================================ */

/* ── Banner ──────────────────────────────────────────────── */
#jmfc-cb {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 32px));
  opacity: 0;
  width: calc(100% - 32px);
  max-width: 1100px;
  z-index: 9990;
  transition: transform .25s cubic-bezier(.22,.61,.36,1), opacity .25s ease;
  pointer-events: none;
}
#jmfc-cb.jmfc-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.jmfc-cb-inner {
  background: #1B263B;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.2);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.jmfc-cb-text {
  flex: 1;
  min-width: 240px;
}
.jmfc-cb-text p {
  margin: 0 0 6px;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  line-height: 1.55;
}
.jmfc-cb-policy {
  font-size: 12px;
  color: #26A69A;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.jmfc-cb-policy:hover { color: #4dd0c8; }
.jmfc-cb-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Shared button styles ────────────────────────────────── */
.jmfc-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  border: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
  white-space: nowrap;
  line-height: 1;
}
.jmfc-btn-primary {
  background: #26A69A;
  color: #fff;
}
.jmfc-btn-primary:hover {
  background: #1e8f84;
  box-shadow: 0 4px 16px rgba(38,166,154,.4);
}
.jmfc-btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
}
.jmfc-btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.65);
}
.jmfc-btn-ghost {
  background: transparent;
  color: rgba(255,255,255,.55);
  padding: 10px 10px;
}
.jmfc-btn-ghost:hover { color: #fff; }
.jmfc-btn:focus-visible {
  outline: 2px solid #26A69A;
  outline-offset: 2px;
}

/* ── Modal overlay ───────────────────────────────────────── */
#jmfc-modal {
  position: fixed;
  inset: 0;
  z-index: 9991;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
#jmfc-modal.jmfc-visible {
  opacity: 1;
  pointer-events: auto;
}
.jmfc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ── Modal box ───────────────────────────────────────────── */
.jmfc-modal-box {
  position: relative;
  background: #1B263B;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(30px);
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
#jmfc-modal.jmfc-visible .jmfc-modal-box {
  transform: translateY(0);
}
.jmfc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: sticky;
  top: 0;
  background: #1B263B;
  z-index: 1;
}
.jmfc-modal-head h2 {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}
.jmfc-modal-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.jmfc-modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.jmfc-modal-close:focus-visible {
  outline: 2px solid #26A69A;
  outline-offset: 2px;
}

/* ── Category rows ───────────────────────────────────────── */
.jmfc-cat {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.jmfc-cat:last-child { border-bottom: none; }
.jmfc-cat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.jmfc-cat-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.jmfc-cat-desc {
  color: rgba(255,255,255,.55);
  font-size: 12px;
  line-height: 1.5;
}
.jmfc-always {
  font-size: 11px;
  font-weight: 700;
  color: #26A69A;
  white-space: nowrap;
  padding-top: 3px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* ── Toggle switch ───────────────────────────────────────── */
.jmfc-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.jmfc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.jmfc-slider {
  display: block;
  width: 44px;
  height: 24px;
  background: rgba(255,255,255,.18);
  border-radius: 12px;
  transition: background .2s ease;
  position: relative;
}
.jmfc-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.jmfc-toggle input:checked + .jmfc-slider { background: #26A69A; }
.jmfc-toggle input:checked + .jmfc-slider::after { transform: translateX(20px); }
.jmfc-toggle input:focus-visible + .jmfc-slider {
  outline: 2px solid #26A69A;
  outline-offset: 2px;
}

/* ── Modal footer ────────────────────────────────────────── */
.jmfc-modal-foot {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  position: sticky;
  bottom: 0;
  background: #1B263B;
}
.jmfc-modal-foot .jmfc-btn { flex: 1; text-align: center; }

/* ── Footer settings link ────────────────────────────────── */
a.jmfc-settings-link {
  color: inherit;
  opacity: .65;
  text-decoration: none;
  transition: opacity .15s;
}
a.jmfc-settings-link:hover { opacity: 1; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 680px) {
  #jmfc-cb {
    bottom: 0;
    width: calc(100% - 24px);
    border-radius: 16px 16px 0 0;
    left: 12px;
    transform: translateX(0) translateY(calc(100% + 16px));
  }
  #jmfc-cb.jmfc-visible {
    transform: translateX(0) translateY(0);
  }
  .jmfc-cb-inner {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px 16px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  }
  .jmfc-cb-actions {
    flex-direction: column;
  }
  .jmfc-cb-actions .jmfc-btn {
    width: 100%;
    text-align: center;
  }
  .jmfc-modal-box {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
  }
  .jmfc-modal-foot {
    flex-direction: column;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  }
}
