/* ═════════════════════════════════════════════════════════════════════════════
   CLARUM METHOD – PRIVACY BY DESIGN & GOOGLE CONSENT MODE v2 STYLES
   Consent Banner, Preferences Center Modal, Toggles & Footer Link
   ═════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Consent Banner (Docked at Bottom) ── */
.clarum-consent-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.15);
  padding: 1.25rem 1.5rem;
  animation: clarumSlideUp 0.3s ease-out;
  box-sizing: border-box;
}

@keyframes clarumSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.clarum-consent-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

@media (min-width: 860px) {
  .clarum-consent-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .clarum-consent-text-area {
    flex: 1;
    margin-right: 1.5rem;
  }
}

.clarum-consent-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 0.35rem;
}

.clarum-consent-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.35rem 0;
  font-family: inherit;
}

.clarum-consent-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
  font-family: inherit;
}

.clarum-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ── 2. Buttons ── */
.clarum-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  box-sizing: border-box;
}

.clarum-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4);
}

.clarum-btn-accept {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  color: #0b0f19;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.clarum-btn-accept:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.clarum-btn-reject {
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.clarum-btn-reject:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.clarum-btn-custom {
  background: transparent;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.clarum-btn-custom:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.6);
}

.clarum-btn-save {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.clarum-btn-save:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

/* ── 3. Preferences Center Modal ── */
.clarum-pref-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.clarum-pref-dialog {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  animation: clarumScaleIn 0.2s ease-out;
  box-sizing: border-box;
  color: #f8fafc;
}

@keyframes clarumScaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.clarum-pref-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.clarum-pref-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f8fafc;
  font-family: inherit;
}

.clarum-pref-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #94a3b8;
  font-family: inherit;
}

.clarum-pref-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.clarum-pref-close:hover {
  color: #f8fafc;
}

.clarum-pref-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.clarum-pref-card {
  background: rgba(18, 26, 43, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  box-sizing: border-box;
}

.clarum-pref-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.clarum-pref-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.clarum-cat-icon {
  font-size: 1.05rem;
}

.clarum-pref-card-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.4;
  font-family: inherit;
}

.clarum-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.clarum-status-pill.always-on {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

/* ── 4. Toggle Switch ── */
.clarum-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  margin: 0;
}

.clarum-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.clarum-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(71, 85, 105, 0.6);
  transition: 0.2s;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.clarum-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 50%;
}

.clarum-switch input:checked + .clarum-slider {
  background-color: #38bdf8;
  border-color: #38bdf8;
}

.clarum-switch input:checked + .clarum-slider:before {
  transform: translateX(20px);
  background-color: #0b0f19;
}

.clarum-pref-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── 5. Footer Link ── */
.clarum-privacy-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: underline;
  transition: color 0.2s;
  font-family: inherit;
  margin-top: 6px;
  display: inline-block;
}

.clarum-privacy-btn:hover {
  color: #38bdf8;
}

.cursor-pointer {
  cursor: pointer;
}
