/**
 * Kartu izin data pemakaian (Usage Analytics).
 *
 * Berkas terpisah, bukan bagian rtmkit.scss, supaya perubahannya tidak menunggu
 * kompilasi ulang seluruh stylesheet panel — pola yang sama dipakai
 * rtmkit-new-feature.css. Semuanya diawali #rtmkit-root agar tidak pernah bocor
 * ke halaman wp-admin lain.
 */

#rtmkit-root .rtmkit-consent__heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Pil status ──────────────────────────────────────────────────────── */

#rtmkit-root .rtmkit-consent__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.6;
}

#rtmkit-root .rtmkit-consent__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

#rtmkit-root .rtmkit-consent__status--on {
  border-color: rgba(0, 206, 166, 0.35);
  background: rgba(0, 206, 166, 0.1);
  color: var(--accent-color);
}

/* ── Baris sakelar ───────────────────────────────────────────────────── */

#rtmkit-root .rtmkit-consent__switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s;
}

#rtmkit-root .rtmkit-consent__switch:hover {
  border-color: var(--border-color-hover);
}

/**
 * .switch-input disembunyikan dengan lebar nol, tapi tetap terhitung sebagai
 * flex item — jadi gap .switch dipakai dua kali dan sakelarnya tampak menjorok
 * dari tepi kartu. Dikeluarkan dari alur, tanpa mengubah komponen aslinya.
 */
#rtmkit-root .rtmkit-consent__switch .switch {
  position: relative;
}

#rtmkit-root .rtmkit-consent__switch .switch-input {
  position: absolute;
  inset-inline-start: 0;
}

#rtmkit-root .rtmkit-consent__switch-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

#rtmkit-root .rtmkit-consent__switch-label {
  color: var(--heading-color);
  font-weight: 500;
}

#rtmkit-root .rtmkit-consent__switch-hint,
#rtmkit-root .rtmkit-telemetry-feedback {
  font-size: 12px;
  color: var(--text-muted);
}

#rtmkit-root .rtmkit-telemetry-feedback:empty {
  display: none;
}

/* ── Tombol rincian ──────────────────────────────────────────────────── */

#rtmkit-root .rtmkit-consent__disclose {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

/* Bootstrap memasang ring fokus tebal di .btn; di sini cukup garis bawah. */
#rtmkit-root .rtmkit-consent__disclose:hover,
#rtmkit-root .rtmkit-consent__disclose:focus,
#rtmkit-root .rtmkit-consent__disclose:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--heading-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#rtmkit-root .rtmkit-consent__chevron {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background-color: currentColor;
  transition: transform 0.2s ease;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/></svg>');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/></svg>');
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

#rtmkit-root .rtmkit-consent__disclose[aria-expanded="true"] .rtmkit-consent__chevron {
  transform: rotate(180deg);
}

/* ── Panel rincian ───────────────────────────────────────────────────── */

#rtmkit-root .rtmkit-consent__panel {
  margin-top: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--secondary-color);
}

#rtmkit-root .rtmkit-consent__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  #rtmkit-root .rtmkit-consent__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}

#rtmkit-root .rtmkit-consent__panel-title {
  margin: 0 0 0.75rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#rtmkit-root .rtmkit-consent__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

#rtmkit-root .rtmkit-consent__list li {
  position: relative;
  padding-inline-start: 1.6rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-color);
}

#rtmkit-root .rtmkit-consent__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.3em;
  width: 13px;
  height: 13px;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-size: contain;
}

#rtmkit-root .rtmkit-consent__list--sends li::before {
  background-color: var(--accent-color);
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425z"/></svg>');
}

#rtmkit-root .rtmkit-consent__list--never li::before {
  background-color: var(--danger-text-color);
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/></svg>');
}

/* ── Baris keterangan di kaki panel ──────────────────────────────────── */

#rtmkit-root .rtmkit-consent__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}

#rtmkit-root .rtmkit-consent__meta strong {
  color: var(--text-color);
  font-weight: 500;
}

#rtmkit-root .rtmkit-consent__meta a {
  color: var(--accent-color);
  text-decoration: none;
}

#rtmkit-root .rtmkit-consent__meta a:hover,
#rtmkit-root .rtmkit-consent__meta a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/**
 * Notice sekali-tanya di halaman Widgets: satu-satunya kartu di sana yang
 * menunggu jawaban, jadi diberi garis aksen supaya tidak tenggelam.
 */
#rtmkit-root .rtmkit-telemetry-notice {
  border-inline-start: 3px solid var(--accent-color);
}
