/* =========================================================
   AIVARA ID - SAFE EDITOR LAYER
   Tidak mengubah baseline. Hanya overlay editor + safe overrides.
   ========================================================= */

:root {
  --aivara-user-font-scale: 1;
  --aivara-user-accent: #ef4d5c;
  --aivara-user-navy: #07183f;
  --aivara-user-radius-plus: 0px;
}

body.aivara-edit-mode {
  --coral: var(--aivara-user-accent);
  --navy: var(--aivara-user-navy);
}

body.aivara-edit-mode .aivara-hero p,
body.aivara-edit-mode .aivara-link-card > p,
body.aivara-edit-mode .aivara-summary-row p,
body.aivara-edit-mode .aivara-benefits p,
body.aivara-edit-mode .aivara-select-card small,
body.aivara-edit-mode .aivara-select-card strong,
body.aivara-edit-mode .aivara-link-row,
body.aivara-edit-mode .aivara-mini-features strong,
body.aivara-edit-mode .aivara-mini-features small {
  font-size: calc(1em * var(--aivara-user-font-scale));
}

body.aivara-edit-mode .aivara-video-card,
body.aivara-edit-mode .aivara-link-card,
body.aivara-edit-mode .aivara-benefits,
body.aivara-edit-mode .aivara-select-card,
body.aivara-edit-mode .aivara-mini-features article,
body.aivara-edit-mode .aivara-profile-module,
body.aivara-edit-mode .aivara-profile-card,
body.aivara-edit-mode .aivara-link-row {
  border-radius: calc(20px + var(--aivara-user-radius-plus)) !important;
}

.aivara-edit-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #07183f;
  color: #fff;
  box-shadow: 0 18px 54px rgba(7, 24, 63, .22);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.aivara-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  background: rgba(7, 24, 63, .32);
  backdrop-filter: blur(10px);
}

.aivara-editor-backdrop.is-open {
  display: block;
}

.aivara-editor-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10002;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(232, 237, 245, .96);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(7, 24, 63, .24);
  transform: translateX(calc(100% + 40px));
  transition: transform .2s ease;
}

.aivara-editor-panel.is-open {
  transform: translateX(0);
}

.aivara-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.aivara-editor-head h2 {
  margin: 0;
  color: #07183f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.045em;
}

.aivara-editor-head p {
  margin: 6px 0 0;
  color: #5f6b85;
  font-size: 13px;
  line-height: 1.45;
}

.aivara-editor-close {
  width: 36px;
  height: 36px;
  border: 1px solid #e8edf5;
  border-radius: 999px;
  background: #fff;
  color: #07183f;
  font-size: 22px;
  cursor: pointer;
}

.aivara-editor-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 14px 0;
}

.aivara-editor-tabs button {
  min-height: 36px;
  border: 1px solid #e8edf5;
  border-radius: 999px;
  background: #fff;
  color: #07183f;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.aivara-editor-tabs button.is-active {
  border-color: rgba(239, 77, 92, .3);
  background: #fff1f2;
  color: #ef4d5c;
}

.aivara-editor-section {
  display: none;
}

.aivara-editor-section.is-active {
  display: grid;
  gap: 12px;
}

.aivara-editor-field {
  display: grid;
  gap: 6px;
}

.aivara-editor-field label {
  color: #07183f;
  font-size: 12px;
  font-weight: 900;
}

.aivara-editor-field input,
.aivara-editor-field textarea,
.aivara-editor-field select {
  width: 100%;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  background: #fbfcff;
  color: #07183f;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.aivara-editor-field textarea {
  min-height: 72px;
  resize: vertical;
}

.aivara-editor-field input[type="color"] {
  height: 42px;
  padding: 5px;
}

.aivara-editor-help {
  color: #5f6b85;
  font-size: 12px;
  line-height: 1.45;
}

.aivara-editor-actions {
  position: sticky;
  bottom: -18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.72), #fff 32%);
}

.aivara-editor-actions button,
.aivara-editor-file-label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #e8edf5;
  background: #fff;
  color: #07183f;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
}

.aivara-editor-actions .primary {
  border: 0;
  background: #07183f;
  color: #fff;
}

.aivara-editor-actions .danger {
  border-color: rgba(239, 77, 92, .28);
  color: #ef4d5c;
}

.aivara-editor-file-label input {
  display: none;
}

.aivara-editor-lock {
  padding: 10px 12px;
  border-radius: 16px;
  background: #f8fafc;
  color: #5f6b85;
  font-size: 12px;
  line-height: 1.45;
}

.aivara-editor-lock strong {
  display: block;
  color: #07183f;
  margin-bottom: 3px;
}
