/* 이동섭의 자동화시스템 중 노선별 전체 열차 조회창 디자인 부분 */
.line-query-open {
  height: 34px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: 0;
}

.line-query-dialog {
  width: min(1140px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(20, 32, 51, 0.25);
  letter-spacing: 0;
}

.line-query-dialog::backdrop {
  background: rgba(20, 32, 51, 0.45);
}

.line-query-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
}

.line-query-header h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0;
}

.line-query-close {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  font-size: 23px;
  line-height: 1;
}

.line-query-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px 18px;
  border-bottom: 1px solid var(--line);
}

.line-query-toolbar label {
  font-size: 13px;
  font-weight: 800;
}

.line-query-toolbar select {
  width: 200px;
  max-width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.line-query-submit {
  min-width: 82px;
  height: 38px;
  padding: 0 16px;
  border-color: var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: white;
  font-size: 13px;
}

#lineQuerySlot, #lineTrackingSlot {
  width: 90px;
}

.line-query-stop {
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
}
.line-tracking-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 24px 0;
}
.line-tracking-lines:empty { display: none; }
.line-tracking-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.line-tracking-chip.selected { border-color: var(--blue); }
.line-tracking-lines button { border: 0; border-radius: 0; padding: 6px 10px; font-size: 12px; }
.line-tracking-lines button.selected { color: var(--blue); }
.line-tracking-lines .line-tracking-delete { width: 30px; flex: 0 0 30px; padding: 0; font-size: 18px; line-height: 1; border-left: 1px solid var(--line); color: var(--muted); }
.line-tracking-delete:not(:disabled):hover { background: #fff1f0; color: #bf3333; }
.line-tracking-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 24px 0;
}
.line-tracking-metrics div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.line-tracking-metrics span { font-size: 12px; color: var(--muted); }
.line-tracking-metrics strong { font-size: 17px; overflow-wrap: anywhere; }
.history-save-feedback { margin: 0 20px 10px; color: var(--green); font-size: 12px; }
.history-save-feedback:empty { display: none; }
#downloadBtn[hidden], #highSpeedDownloadBtn[hidden] { display: none; }

.line-query-register {
  min-width: 52px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.line-query-key {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.line-query-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 18px 24px 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.line-query-summary span {
  color: var(--muted);
}

.line-query-result {
  min-height: 19px;
  margin: 6px 24px 14px;
  color: var(--green);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.line-query-result.is-error {
  color: var(--red);
}

.line-query-result.is-empty {
  color: var(--muted);
}

.line-query-table-wrap {
  max-height: min(560px, calc(100dvh - 275px));
  min-height: 140px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.line-query-table {
  width: 100%;
  min-width: 1010px;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.line-query-table th,
.line-query-table td {
  height: 47px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.line-query-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: #53647b;
  font-size: 12px;
}

.line-query-table tbody tr:hover {
  background: #f5f8fc;
}

.line-query-train {
  font-weight: 900;
}

.line-query-status {
  color: #416684;
  font-weight: 800;
}

.line-query-status.is-arrived {
  color: #087f5c;
}

.line-query-api-time {
  color: #53647b;
}

.line-query-table .line-query-empty {
  height: 140px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 600px) {
  .line-tracking-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px 0; }
  .line-tracking-lines { padding-left: 16px; padding-right: 16px; }
  .line-query-header {
    padding: 16px;
  }
  .line-query-toolbar {
    padding: 0 16px 14px;
  }
  .line-query-toolbar select {
    flex: 1;
    min-width: 100px;
    width: auto;
  }
  .line-query-key {
    flex-basis: 100%;
    margin-left: 0;
  }
  .line-query-summary {
    padding: 14px 16px 0;
  }
  .line-query-result {
    margin-left: 16px;
    margin-right: 16px;
  }
}
