/* Standalone Price History page + snapshot History tab list */
.kse-ph-page {
  max-width: 920px;
  padding: 18px 16px 40px;
}

.kse-ph-page.is-workspace {
  max-width: none;
  padding: 8px 4px 32px;
}

.kse-ph-page .kse-quote-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 12px;
}

.kse-ph-page .kse-quote-breadcrumbs a {
  color: #087f8c;
}

.kse-ph-page .kse-quote-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #00568a;
  background: #e6f2ff;
  border: 1px solid #c7def8;
}

.kse-ph-page .kse-quote-title {
  margin: 8px 0 6px;
  line-height: 1.18;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  color: #092b47;
}

.kse-ph-page .kse-quote-caption {
  margin: 0 0 16px;
  color: #547087;
  font-size: 0.92rem;
}

.kse-ph-page .ph-page-search {
  max-width: 440px;
  margin: 0 0 16px;
}

.kse-price-history-pane {
  position: relative;
}

.kse-price-history-pane .ph-wrap {
  max-width: none;
}

.ph-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d5e4f1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(7, 35, 62, 0.06);
}

.ph-range-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 140px;
  max-width: 200px;
}

.ph-range-field label {
  font-size: 12px;
  font-weight: 600;
  color: #5a7489;
}

.ph-range-field input[type="date"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d5e4f1;
  font-size: 13px;
  background: #f9fcff;
  box-sizing: border-box;
  color: #12344f;
}

.ph-range-apply {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: #0a5eb7;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  height: 38px;
}

.ph-legend {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a7489;
  margin: 0 0 8px;
}

.ph-list {
  border: 1px solid #d5e4f1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(7, 35, 62, 0.06);
  overflow: hidden;
}

.ph-status,
.ph-empty {
  padding: 28px 12px;
  text-align: center;
  color: #5a7489;
  font-size: 14px;
}

.ph-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid #e8f0f7;
  padding: 11px 14px;
}

.ph-row:last-child {
  border-bottom: 0;
}

.ph-date {
  flex: 0 0 7.4em;
  font-size: 13px;
  font-weight: 600;
  color: #5a7489;
}

.ph-close {
  flex: 0 0 auto;
  min-width: 4.4em;
  font-size: 18px;
  font-weight: 800;
  color: #12344f;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ph-chg {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-weight: 700;
  line-height: 1.1;
}

.ph-chg-abs {
  font-size: 15px;
}

.ph-chg-pct {
  font-size: 13px;
}

.ph-vol {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 3.8em;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: #5a7489;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ph-annc {
  flex: 0 0 auto;
}

.ph-chg.up {
  color: #047857;
}

.ph-chg.down {
  color: #b91c1c;
}

.ph-chg.flat {
  color: #64748b;
}

.ph-bell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.ph-bell {
  font-size: 1em;
  line-height: 1;
}

.ph-tags {
  display: inline-flex;
  gap: 3px;
  flex-wrap: wrap;
}

.ph-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.03em;
}

.ph-tag-fr {
  background: #0d9488;
}

.ph-tag-xd {
  background: #dc2626;
}

.ph-tag-bn {
  background: #7c3aed;
}

.so-spark-label.so-history-open {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.so-history-open .so-history-all {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  text-transform: none;
  letter-spacing: 0;
}

.ph-event-screen[hidden],
.ph-event-popup[hidden] {
  display: none !important;
}

.ph-event-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99999;
}

.ph-event-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ph-event-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  font-weight: 700;
}

.ph-event-popup-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.ph-event-popup-body {
  overflow-y: auto;
  padding: 12px 14px;
}

.ph-event-card {
  border-bottom: 1px solid #eef2f7;
  padding: 10px 0;
}

.ph-event-card:last-child {
  border-bottom: 0;
}

.ph-event-tags {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.ph-event-line {
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
}

.ph-event-line:first-of-type {
  font-weight: 700;
  color: #0f172a;
}

@media (max-width: 640px) {
  .ph-range-field {
    flex: 1 1 calc(50% - 6px);
    max-width: none;
  }

  .ph-range-apply {
    flex: 1 1 100%;
    height: 40px;
  }
}
