/* ============================================================
   Mindmatrix Cookie Consent — Styles
   ============================================================ */

/* ---- Banner (fixed bottom bar) ---- */
#mm-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  color: #fff;
  padding: 14px 24px;
  z-index: 99999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.mm-consent-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1240px;
  margin: 0 auto;
}

.mm-consent-banner-text {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  color: #fff !important;
}

.mm-consent-banner-text a {
  color: #ff671d !important;
  text-decoration: underline;
}

.mm-consent-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ---- Modal overlay ---- */
#mm-consent-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mm-consent-modal-box {
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  max-width: 580px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.mm-consent-modal-box h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 44px 8px 0;
}

.mm-consent-modal-desc {
  font-size: 13px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.55;
}

.mm-consent-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0;
}

.mm-consent-modal-close:hover { color: #333; }

/* ---- Category rows ---- */
.mm-consent-category {
  border-top: 1px solid #eee;
  padding: 14px 0;
}

.mm-consent-category:last-of-type {
  border-bottom: 1px solid #eee;
  margin-bottom: 18px;
}

.mm-consent-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.mm-consent-category-name {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a2e;
}

.mm-consent-always-on {
  font-size: 11px;
  color: #28a745;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding-right: 4px;
}

.mm-consent-category-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* ---- Toggle switch ---- */
.mm-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

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

.mm-toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 22px;
  transition: background 0.2s;
  cursor: pointer;
}

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

.mm-toggle input:checked + .mm-toggle-slider { background: #ff671d; }
.mm-toggle input:checked + .mm-toggle-slider::before { transform: translateX(18px); }

.mm-toggle input:disabled + .mm-toggle-slider {
  background: #28a745;
  cursor: not-allowed;
}
.mm-toggle input:disabled + .mm-toggle-slider::before { transform: translateX(18px); }

/* ---- Modal footer ---- */
.mm-consent-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mm-consent-modal-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.mm-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  line-height: 1.25;
  font-family: inherit;
  text-decoration: none;
}

.mm-btn-primary {
  background: #ff671d;
  color: #fff !important;
  border: 2px solid #ff671d;
}
.mm-btn-primary:hover {
  background: #e05a16;
  border-color: #e05a16;
}

/* Outline on dark banner background */
.mm-btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff !important;
}
.mm-btn-outline:hover { border-color: #fff; }

/* Outline inside the white modal */
.mm-consent-modal-box .mm-btn-outline {
  color: #1a1a2e !important;
  border-color: #ccc;
}
.mm-consent-modal-box .mm-btn-outline:hover { border-color: #888; }

.mm-btn-ghost {
  background: none;
  border: none;
  color: #aaa;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 400;
  font-family: inherit;
}
.mm-btn-ghost:hover { color: #666; }

/* ---- Footer privacy-preferences trigger ---- */
#mm-privacy-preferences-btn {
  background: none;
  border: none;
  color: #828282;
  font-size: 13px;
  line-height: 15px;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  font-family: inherit;
  vertical-align: baseline;
}
#mm-privacy-preferences-btn:hover { color: #5C5C65; }

/* ---- Responsive ---- */
@media (max-width: 576px) {
  .mm-consent-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .mm-consent-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .mm-consent-modal-box {
    padding: 20px 16px;
  }
  .mm-consent-modal-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .mm-consent-modal-action-group {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ============================================================
   Suppress third-party / legacy consent banners that may be
   injected by cached GTM tags, ZoomInfo, or Chatra before the
   new consent system fully takes over.
   Add selectors here if a new pattern is spotted.
   ============================================================ */

/* ZoomInfo consent overlay */
#zi-modal,
.zi-consent-modal,
.zi-consent-overlay,
[id^="zi-consent"],
[class^="zi-consent"] { display: none !important; }

/* Common GTM-deployed CMPs (Cookiebot, OneTrust, CookiePro) */
#CookiebotWidget,
#Cookiebot,
.CookieConsent,
#cookieConsentContainer,
#cookie-consent-banner,
#onetrust-consent-sdk,
#onetrust-banner-sdk,
.onetrust-pc-dark-filter,
#cookieChoiceInfo,
#cookie-law-info-bar,
#cookie-notice,
.cookie-notice-container { display: none !important; }

/* Chatra cookie notice (if shown before Functional consent is granted) */
.chatra-consent,
#chatra-consent,
[id^="chatra"][class*="consent"],
[class^="chatra"][class*="consent"] { display: none !important; }

/* Generic fallback — hide any fixed bottom element injected by a
   third-party script that is NOT our own banner or modal.
   Targets elements added to <body> directly with inline bottom:0. */
body > div[style*="position: fixed"][style*="bottom: 0"]:not(#mm-consent-banner):not(#mm-consent-modal),
body > div[style*="position:fixed"][style*="bottom:0"]:not(#mm-consent-banner):not(#mm-consent-modal) {
  display: none !important;
}

