/**
 * Sky Cookie Consent banner + preferences panel.
 * Scoped .sky-cc-* class names; high z-index; self-contained so it won't
 * clash with Elementor / WoodMart. No theme variables relied on.
 */

.sky-cc,
.sky-cc * { box-sizing: border-box; }

.sky-cc {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #19232e;
}

/* ── Bottom banner ────────────────────────────────────────────── */
.sky-cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid rgba(25, 35, 46, 0.12);
  border-radius: 16px;
  box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.35), 0 2px 8px rgba(15, 23, 42, 0.08);
}

.sky-cc-banner__text { flex: 1 1 360px; min-width: 0; }
.sky-cc-banner__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -0.2px; color: #19232e; }
.sky-cc-banner__body { margin: 0; font-size: 13.5px; line-height: 1.5; color: #586976; }

.sky-cc-link { color: #1b7fb8; font-weight: 600; text-decoration: underline; }

.sky-cc-banner__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ── Buttons (Reject and Accept equal prominence — no dark pattern) ── */
.sky-cc-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 11px;
  border: 1.5px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.sky-cc-btn--primary { background: #1b7fb8; color: #fff; border-color: #1b7fb8; }
.sky-cc-btn--primary:hover { background: #156a9b; border-color: #156a9b; }
/* Reject: same size/weight as Accept, neutral fill — clearly a button, not hidden. */
.sky-cc-btn--ghost { background: #f1f5f8; color: #19232e; border-color: rgba(25, 35, 46, 0.14); }
.sky-cc-btn--ghost:hover { background: #e6ecf1; }

/* ── Preferences panel (centre modal) ─────────────────────────── */
.sky-cc-panel {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sky-cc-panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}
.sky-cc-panel__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.45);
  overflow: hidden;
}
.sky-cc-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(25, 35, 46, 0.09);
}
.sky-cc-panel__title { margin: 0; font-size: 17px; font-weight: 700; color: #19232e; }
.sky-cc-panel__close {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-size: 26px; line-height: 1; color: #93a2ae; padding: 0 4px;
}
.sky-cc-panel__close:hover { color: #19232e; }
.sky-cc-panel__body { padding: 8px 20px; overflow-y: auto; }
.sky-cc-panel__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(25, 35, 46, 0.09);
}

/* ── Category rows ────────────────────────────────────────────── */
.sky-cc-cat { padding: 14px 0; border-bottom: 1px solid rgba(25, 35, 46, 0.07); }
.sky-cc-cat:last-child { border-bottom: 0; }
.sky-cc-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sky-cc-cat__label { font-size: 14.5px; font-weight: 700; color: #19232e; }
.sky-cc-cat__always { margin-left: auto; margin-right: 10px; font-size: 12px; font-weight: 600; color: #10b981; }
.sky-cc-cat__desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: #586976; }

/* Locked necessary checkbox */
.sky-cc-cat input[disabled] { width: 18px; height: 18px; accent-color: #10b981; opacity: .7; cursor: not-allowed; }

/* ── Toggle switch ────────────────────────────────────────────── */
.sky-cc-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.sky-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sky-cc-switch__track {
  width: 44px; height: 26px; border-radius: 999px;
  background: #cbd5e1; transition: background .18s ease; position: relative;
}
.sky-cc-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s ease;
}
.sky-cc-switch input:checked + .sky-cc-switch__track { background: #1b7fb8; }
.sky-cc-switch input:checked + .sky-cc-switch__track::after { transform: translateX(18px); }
.sky-cc-switch input:focus-visible + .sky-cc-switch__track { outline: 2px solid #1b7fb8; outline-offset: 2px; }

/* ── Footer link ──────────────────────────────────────────────── */
.sky-cc-footer-link { text-align: center; padding: 8px 0; }
.sky-cc-settings-link { font-size: 13px; color: inherit; opacity: .85; cursor: pointer; }
.sky-cc-settings-link:hover { opacity: 1; text-decoration: underline; }

/* ── Mobile: full-width banner, visible without scrolling ─────── */
@media (max-width: 640px) {
  .sky-cc-banner {
    left: 8px; right: 8px; bottom: 8px;
    padding: 16px;
    border-radius: 14px;
    gap: 12px;
  }
  .sky-cc-banner__actions { width: 100%; }
  .sky-cc-banner__actions .sky-cc-btn { flex: 1 1 auto; text-align: center; }
  .sky-cc-panel__inner { max-height: 90vh; }
}
