/* =========================================================
   M2 / Bygnicon — Cookie Consent (styles)
   Paired with assets/js/consent.js
   ========================================================= */

.m2c-banner,
.m2c-modal,
.m2c-modal * { box-sizing: border-box; }

.m2c-banner,
.m2c-modal {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  color: #0F1729;
}

/* ---------- Banner ---------- */
.m2c-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 24px;
  background: #1A2540;
  color: #F4EEDF;
  border: 1px solid rgba(184, 149, 106, 0.35);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 41, 0.55), 0 2px 8px rgba(15, 23, 41, 0.18);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(.22, 1, .36, 1), opacity 0.35s ease;
}
.m2c-banner.is-in { transform: translateY(0); opacity: 1; }

.m2c-banner__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.m2c-banner__body { flex: 1 1 320px; min-width: 0; }

.m2c-banner__title {
  margin: 0 0 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #F4EEDF;
}
.m2c-banner__title em { color: #D4B689; font-style: italic; }

.m2c-banner__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(244, 238, 223, 0.82);
}
.m2c-banner__text a {
  color: #D4B689;
  border-bottom: 1px solid rgba(212, 182, 137, 0.35);
  transition: border-color 0.25s ease;
}
.m2c-banner__text a:hover { border-bottom-color: #D4B689; }

.m2c-banner__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.m2c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(.22, 1, .36, 1);
}
.m2c-btn:focus-visible { outline: 2px solid #D4B689; outline-offset: 3px; }

.m2c-btn--gold      { background: #B8956A; border-color: #B8956A; color: #1A2540; }
.m2c-btn--gold:hover{ background: #D4B689; border-color: #D4B689; }

.m2c-btn--cream      { background: #F4EEDF; border-color: #F4EEDF; color: #1A2540; }
.m2c-btn--cream:hover{ background: #FAF6EC; border-color: #FAF6EC; }

.m2c-btn--ghost      { background: transparent; color: #F4EEDF; border-color: rgba(244, 238, 223, 0.45); }
.m2c-btn--ghost:hover{ background: rgba(244, 238, 223, 0.08); border-color: rgba(244, 238, 223, 0.7); }

.m2c-btn--ghost-ink      { background: transparent; color: #1A2540; border-color: rgba(15, 23, 41, 0.35); }
.m2c-btn--ghost-ink:hover{ background: rgba(15, 23, 41, 0.05); border-color: #1A2540; }

/* ---------- Banner — mobile ---------- */
@media (max-width: 720px) {
  .m2c-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 20px 18px;
    border-radius: 12px;
  }
  .m2c-banner__inner { gap: 18px; }
  .m2c-banner__title { font-size: 1.3rem; }
  .m2c-banner__text  { font-size: 0.85rem; }
  .m2c-banner__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .m2c-btn { width: 100%; padding: 14px 18px; }
}

/* ---------- Modal ---------- */
.m2c-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.m2c-modal.is-open { display: flex; }

.m2c-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 41, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.m2c-modal.is-open .m2c-modal__backdrop { opacity: 1; }

.m2c-modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #F4EEDF;
  color: #0F1729;
  border-radius: 14px;
  box-shadow: 0 40px 100px -20px rgba(15, 23, 41, 0.6);
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.22, 1, .36, 1), opacity 0.3s ease;
}
.m2c-modal.is-open .m2c-modal__panel { transform: translateY(0) scale(1); opacity: 1; }

.m2c-modal__head {
  position: relative;
  padding: 28px 32px 16px;
  border-bottom: 1px solid rgba(15, 23, 41, 0.08);
}
.m2c-modal__eyebrow {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B8956A;
}
.m2c-modal__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #1A2540;
}
.m2c-modal__title em { color: #B8956A; font-style: italic; }
.m2c-modal__intro {
  margin: 12px 0 0;
  max-width: 54ch;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #3A4258;
}

.m2c-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #1A2540;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s ease;
}
.m2c-modal__close:hover { background: rgba(15, 23, 41, 0.07); }
.m2c-modal__close:focus-visible { outline: 2px solid #B8956A; outline-offset: 2px; }
.m2c-modal__close svg { width: 16px; height: 16px; }

.m2c-modal__body {
  flex: 1 1 auto;
  padding: 8px 32px 24px;
  overflow-y: auto;
}

/* ---------- Categories ---------- */
.m2c-cat {
  padding: 20px 0;
  border-bottom: 1px solid rgba(15, 23, 41, 0.08);
}
.m2c-cat:last-child { border-bottom: 0; }

.m2c-cat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.m2c-cat__label {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #1A2540;
}
.m2c-cat__body {
  margin: 8px 0 0;
  max-width: 58ch;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #3A4258;
}
.m2c-cat__status {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #B8956A;
}

/* ---------- Toggle ---------- */
.m2c-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 4px;
}
.m2c-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.m2c-toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(15, 23, 41, 0.18);
  transition: background 0.25s ease;
}
.m2c-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F4EEDF;
  box-shadow: 0 1px 3px rgba(15, 23, 41, 0.25);
  transition: transform 0.25s cubic-bezier(.22, 1, .36, 1);
}
.m2c-toggle input:checked ~ .m2c-toggle__track { background: #B8956A; }
.m2c-toggle input:checked ~ .m2c-toggle__thumb { transform: translateX(22px); }
.m2c-toggle input:focus-visible ~ .m2c-toggle__track { box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.35); }
.m2c-toggle input:disabled { cursor: not-allowed; }
.m2c-toggle input:disabled ~ .m2c-toggle__track { background: #B8956A; opacity: 0.55; }
.m2c-toggle input:disabled ~ .m2c-toggle__thumb { opacity: 0.85; }

/* ---------- Modal footer ---------- */
.m2c-modal__foot {
  padding: 18px 32px 24px;
  background: #FAF6EC;
  border-top: 1px solid rgba(15, 23, 41, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.m2c-modal__foot-links { font-size: 0.8rem; color: #4A5266; }
.m2c-modal__foot-links a {
  color: #1A2540;
  border-bottom: 1px solid rgba(15, 23, 41, 0.25);
  transition: border-color 0.25s ease;
}
.m2c-modal__foot-links a:hover { border-bottom-color: #1A2540; }
.m2c-modal__foot-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Modal — mobile ---------- */
@media (max-width: 720px) {
  .m2c-modal { padding: 0; align-items: flex-end; }
  .m2c-modal__panel {
    max-width: none;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
  .m2c-modal__head { padding: 24px 22px 14px; }
  .m2c-modal__title { font-size: 1.7rem; }
  .m2c-modal__body { padding: 6px 22px 18px; }
  .m2c-modal__foot {
    padding: 16px 22px 22px;
    flex-direction: column;
    align-items: stretch;
  }
  .m2c-modal__foot-actions { width: 100%; flex-direction: column; }
  .m2c-modal__foot-links { order: 2; text-align: center; padding-top: 6px; }
  .m2c-modal__foot-actions .m2c-btn { width: 100%; }
}

/* ---------- Footer "Cookie Settings" link ---------- */
.m2c-footer-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: rgba(244, 238, 223, 0.85);
  border-bottom: 1px solid rgba(244, 238, 223, 0.2);
  line-height: inherit;
  transition: border-color 0.25s ease;
}
.m2c-footer-link:hover { border-bottom-color: rgba(244, 238, 223, 0.7); }
.m2c-footer-link:focus-visible {
  outline: 2px solid #B8956A;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Atelier footer variant — lower-opacity to match the portal style */
.atelier-bottom .m2c-footer-link {
  color: rgba(244, 238, 223, 0.68);
  border-bottom: 1px solid rgba(244, 238, 223, 0.15);
  padding-bottom: 1px;
  letter-spacing: inherit;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.atelier-bottom .m2c-footer-link:hover {
  color: #B8956A;
  border-bottom-color: #B8956A;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .m2c-banner,
  .m2c-modal__backdrop,
  .m2c-modal__panel,
  .m2c-toggle__track,
  .m2c-toggle__thumb,
  .m2c-btn { transition: none !important; }
  .m2c-banner { transform: translateY(0); }
}
