/* css/10-realtime-price.css — Price source widget (P10) */

.rtp-host { display: block; }

.rtp-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 2px 8px -2px rgba(15,23,42,0.05);
}

/* head */
.rtp-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.rtp-head-left { display: flex; align-items: center; gap: 10px; }
.rtp-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
.rtp-dot.is-ok      { background: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.20); }
.rtp-dot.is-pending { background: var(--warning); }
.rtp-dot.is-syncing { background: var(--info); animation: rtp-pulse 1.2s ease-in-out infinite; }
@keyframes rtp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.5; }
}
.rtp-head-eyebrow { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rtp-head-status  { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 1px; }
.rtp-refresh {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--surface-tint);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.rtp-refresh:hover { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-soft); }
.rtp-refresh svg { width: 18px; height: 18px; }

/* segment */
.rtp-seg {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 4px; padding: 4px;
  background: var(--bg-deep);
  border-radius: 14px;
  margin-bottom: 12px;
}
.rtp-seg-tab {
  background: transparent; border: 0;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  cursor: pointer;
  font-family: inherit;
}
.rtp-seg-name {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.rtp-seg-sub {
  font-size: 10px; color: var(--faint); font-weight: 500;
}
.rtp-seg-tab.is-active {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15,23,42,0.08);
}
.rtp-seg-tab.is-active .rtp-seg-name { color: var(--text); }
.rtp-seg-tab.is-active .rtp-seg-sub  { color: var(--text-2); }

/* panel */
.rtp-panel { animation: rtp-fade 0.18s ease both; }
@keyframes rtp-fade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

/* world-bank panel grid */
.rtp-wb-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.rtp-wb-cell {
  background: linear-gradient(160deg, #FAFAF8, #F3F7F1);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.rtp-wb-name  { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.rtp-wb-price { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; margin-top: 2px; }
.rtp-wb-meta  { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* form panel */
.rtp-form { display: flex; flex-direction: column; gap: 10px; }
.rtp-form-row { display: flex; flex-direction: column; gap: 4px; }
.rtp-form-row > label {
  font-size: 11px; letter-spacing: 0.02em; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
}
.rtp-input {
  height: 42px; padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px; color: var(--text);
  font-family: inherit;
}
.rtp-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
select.rtp-input { appearance: menulist; }

.rtp-save-btn {
  height: 46px;
  border-radius: 12px;
  background: var(--primary); color: #fff;
  border: 0; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  margin-top: 2px;
}
.rtp-save-btn:hover { background: var(--primary-ink); }
