/* ════════════════════════════════════════════════════════════════
   MasterClad Cookie Consent - styling
   ════════════════════════════════════════════════════════════════ */

#mc-ccc * { box-sizing: border-box; font-family: 'Montserrat', sans-serif; }

/* ── Bottom banner ─────────────────────────────────────────────── */
.ccc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  background: var(--white, #fff);
  border-top: 1px solid var(--border, #e1e7ee);
  box-shadow: 0 -8px 30px rgba(0,0,0,.12);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  transform: translateY(110%);
  transition: transform .35s ease;
}
.ccc-banner.ccc-visible { transform: translateY(0); }
.ccc-banner__actions { margin-left: auto; }

.ccc-banner__text { flex: 1 1 320px; min-width: 0; }
.ccc-banner__text p {
  margin: 0;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-light, #556074);
}
.ccc-banner__text a { color: var(--blue, #0054AE); font-weight: 700; }

.ccc-banner__actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Shared buttons ────────────────────────────────────────────── */
.ccc-btn {
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .6rem 1.1rem;
  border-radius: 25px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s ease;
  border: 1.5px solid transparent;
}
.ccc-btn--primary { background: var(--blue, #0054AE); color: #fff; }
.ccc-btn--primary:hover { background: var(--blue-dark, #003d80); }
.ccc-btn--outline { background: transparent; border-color: var(--border, #e1e7ee); color: var(--text, #1a1a2e); }
.ccc-btn--outline:hover { border-color: var(--blue, #0054AE); color: var(--blue, #0054AE); }
.ccc-btn--danger { background: #dc2626; color: #fff; }
.ccc-btn--danger:hover { background: #b91c1c; }
.ccc-btn--ghost { background: transparent; border: none; color: var(--text-light, #556074); text-decoration: underline; padding: .6rem .3rem; }
.ccc-btn--ghost:hover { color: var(--blue, #0054AE); }

/* ── Overlay (panel backdrop only, not blocking the page itself) ── */
.ccc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,35,.55);
  z-index: 99991;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
.ccc-overlay.ccc-visible { opacity: 1; visibility: visible; }

/* ── Preferences panel ─────────────────────────────────────────── */
.ccc-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(.97);
  width: 92%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--white, #fff);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  z-index: 99992;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease;
}
.ccc-panel.ccc-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.ccc-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border, #e1e7ee);
}
.ccc-panel__header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text, #1a1a2e);
}
.ccc-panel__close {
  background: var(--off-white, #f5f8fc);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-light, #556074);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.ccc-panel__close:hover { background: var(--border, #e1e7ee); }

.ccc-panel__body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }

.ccc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.ccc-row__text { flex: 1; min-width: 0; }
.ccc-row__text h4 { margin: 0 0 .25rem; font-size: .92rem; color: var(--text, #1a1a2e); }
.ccc-row__text p { margin: 0; font-size: .8rem; line-height: 1.55; color: var(--text-light, #556074); }

/* ── Toggle switch ─────────────────────────────────────────────── */
.ccc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  margin-top: .15rem;
  cursor: pointer;
}
.ccc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.ccc-toggle__track {
  position: absolute;
  inset: 0;
  background: var(--border, #d7dee6);
  border-radius: 14px;
  transition: background .2s ease;
}
.ccc-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .2s ease;
}
.ccc-toggle input:checked + .ccc-toggle__track { background: var(--blue, #0054AE); }
.ccc-toggle input:checked + .ccc-toggle__track::after { transform: translateX(20px); }

.ccc-toggle--locked { cursor: default; opacity: .65; }
.ccc-toggle--locked input:checked + .ccc-toggle__track { background: #9aa6b5; }

.ccc-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border, #e1e7ee);
}

/* ── Logout confirm modal - only shown when turning Calculator
   Tools off, since that also ends the calculator login session ── */
.ccc-confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(.97);
  width: 92%;
  max-width: 400px;
  background: var(--white, #fff);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  z-index: 99993;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease;
}
.ccc-confirm.ccc-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.ccc-confirm h4 {
  margin: 0 0 .6rem;
  font-size: 1.05rem;
  color: var(--text, #1a1a2e);
}
.ccc-confirm p {
  margin: 0 0 1.25rem;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text-light, #556074);
}
.ccc-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
}

/* ── Floating reopen icon (bottom-left) ───────────────────────── */
.ccc-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue, #0054AE);
  color: #fff;
  border: 2px solid rgba(255,255,255,.55);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  z-index: 99989;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ccc-fab.ccc-visible { display: flex; }
.ccc-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.3); border-color: rgba(255,255,255,.8); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .ccc-banner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1rem 1.1rem;
    gap: .9rem;
  }
  .ccc-banner__text { flex: 1 1 auto; width: 100%; }
  .ccc-banner__actions { width: 100%; margin-left: 0; }
  .ccc-banner__actions .ccc-btn { flex: 1; text-align: center; }
  .ccc-banner__actions .ccc-btn--ghost { flex: 0 0 100%; order: 3; text-align: center; }

  .ccc-fab { left: 12px; bottom: 12px; width: 42px; height: 42px; font-size: 1rem; }

  .ccc-panel { width: 94%; max-height: 88vh; }
}
