/* ==========================================================================
   Akadverse Pro — Sender Widget
   ========================================================================== */

.akv-sdr-app {
  font-family: inherit;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.akv-sdr-header {
  margin-bottom: 24px;
}
.akv-sdr-heading {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  margin: 0 0 10px;
  color: #2d1248;
}
.akv-sdr-inv-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f0e8ff 0%, #ffe8f4 100%);
  border: 1.5px solid #d8b4e8;
  border-radius: 50px;
  padding: 5px 14px;
  font-size: .8rem;
  font-weight: 700;
  color: #7c3aad;
  letter-spacing: .3px;
  margin-bottom: 10px;
}

.akv-sdr-url-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f0ff;
  border: 1px solid #e0cce8;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .78rem;
  color: #6a3093;
  max-width: 100%;
  overflow: hidden;
  flex-wrap: wrap;
}
.akv-sdr-url-badge--warn {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.akv-sdr-url-sep {
  color: #c0608a;
  font-weight: 700;
}
.akv-sdr-url-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Courier New', monospace;
  font-size: .75rem;
}

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.akv-sdr-tabs {
  display: flex;
  border-bottom: 2px solid #f0e0f0;
  margin-bottom: 24px;
  gap: 4px;
}
.akv-sdr-tab {
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 10px 18px;
  font-size: .9rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.akv-sdr-tab.active {
  color: #c0608a;
  border-bottom-color: #c0608a;
}
.akv-sdr-count-badge {
  background: #eee;
  color: #555;
  font-size: .7rem;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* ── Panel ────────────────────────────────────────────────────────────── */
.akv-sdr-panel { display: block; }
.akv-sdr-panel--hidden { display: none !important; }

/* ── Form ─────────────────────────────────────────────────────────────── */
.akv-sdr-add-form {
  background: #fff;
  border: 1.5px solid #f0e6f6;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(192,96,138,.07);
}
.akv-sdr-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.akv-sdr-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.akv-sdr-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #666;
}
.akv-sdr-input, .akv-sdr-select {
  padding: 11px 14px;
  border: 1.5px solid #e0cce8;
  border-radius: 10px;
  font-size: .92rem;
  font-family: inherit;
  color: #333;
  background: #fafafa;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  box-sizing: border-box;
}
.akv-sdr-input:focus, .akv-sdr-select:focus {
  border-color: #c0608a;
  box-shadow: 0 0 0 3px rgba(192,96,138,.12);
  background: #fff;
}
.akv-sdr-input::placeholder { color: #bbb; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.akv-sdr-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: #c0608a;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  width: 100%;
}
.akv-sdr-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,96,138,.3);
}
.akv-sdr-btn-add-guest { margin-top: 4px; }

/* ── Template section ─────────────────────────────────────────────────── */
.akv-sdr-tpl-section {
  background: #fff;
  border: 1.5px solid #f0e6f6;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(192,96,138,.07);
}
.akv-sdr-tpl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.akv-sdr-tpl-tab {
  padding: 6px 14px;
  border: 1.5px solid #e0cce8;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  background: #fafafa;
  color: #666;
  cursor: pointer;
  transition: all .2s;
}
.akv-sdr-tpl-tab.active {
  background: #c0608a;
  border-color: #c0608a;
  color: #fff;
}
.akv-sdr-tpl-preview {
  background: #f9f5ff;
  border: 1px dashed #d0aee0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .84rem;
  color: #555;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow-y: auto;
}

/* ── List toolbar ─────────────────────────────────────────────────────── */
.akv-sdr-list-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}
.akv-sdr-search {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border: 1.5px solid #e0cce8;
  border-radius: 10px;
  font-size: .88rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.akv-sdr-search:focus { border-color: #c0608a; }
.akv-sdr-filter { flex: 0 0 auto; width: auto; }
.akv-sdr-btn-export, .akv-sdr-btn-clear {
  padding: 9px 14px;
  border: 1.5px solid #e0cce8;
  border-radius: 10px;
  background: #fff;
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
  white-space: nowrap;
}
.akv-sdr-btn-export:hover { background: #f0ffe8; }
.akv-sdr-btn-clear:hover  { background: #fff0f0; }

/* ── Stats ────────────────────────────────────────────────────────────── */
.akv-sdr-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.akv-sdr-stat {
  flex: 1;
  min-width: 80px;
  background: #fff;
  border: 1.5px solid #f0e6f6;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .78rem;
  color: #888;
}
.akv-sdr-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #c0608a;
  line-height: 1;
}

/* ── Guest row ────────────────────────────────────────────────────────── */
.akv-sdr-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #f0e6f6;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: box-shadow .2s;
  flex-wrap: wrap;
}
.akv-sdr-guest-row:hover { box-shadow: 0 4px 16px rgba(192,96,138,.1); }
.akv-sdr-guest-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.akv-sdr-guest-cat { font-size: 1.2rem; flex-shrink: 0; }
.akv-sdr-guest-name { display: block; font-weight: 600; color: #333; font-size: .92rem; }
.akv-sdr-guest-phone { display: block; font-size: .78rem; color: #888; margin-top: 2px; }
.akv-sdr-guest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.akv-sdr-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  white-space: nowrap;
}
.akv-sdr-badge-sent   { background: #c0608a; color: #fff; }
.akv-sdr-badge-unsent { background: #f0e6f6; color: #888; }
.akv-sdr-btn-sm {
  padding: 7px 12px;
  border: 1.5px solid #e0cce8;
  border-radius: 8px;
  background: #fafafa;
  font-size: .78rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
  white-space: nowrap;
}
.akv-sdr-btn-sm:hover { background: #f5eeff; }

/* ── Empty state ──────────────────────────────────────────────────────── */
.akv-sdr-empty {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-size: .9rem;
  border: 1.5px dashed #e0d0e8;
  border-radius: 12px;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.akv-sdr-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.akv-sdr-toast--show {
  opacity: 1;
  transform: translateY(0);
  background: #e8f9ee;
  color: #166534;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.akv-sdr-toast--error { background: #fee2e2; color: #b91c1c; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .akv-sdr-field-row { grid-template-columns: 1fr; }
  .akv-sdr-guest-row { flex-direction: column; align-items: flex-start; }
  .akv-sdr-guest-actions { width: 100%; justify-content: flex-end; }
  .akv-sdr-stats { gap: 8px; }
}

/* ── Guest name in cover (dirender oleh Cover Widget) ────────────────── */
.akv-guest-name {
  display: block;          /* baris baru di bawah dear/to */
  font-weight: 800;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  letter-spacing: 0.5px;
  margin-top: 4px;
  line-height: 1.3;
  /* Warna mengikuti warna dear_text yang sudah di-set via Elementor */
}
