/* HTTP Status Checker - new two-column layout */

.ds-tool .ds-panels {
  margin: 0 -8px;
}
.ds-tool [class*='col-'] {
  padding: 0 8px;
}

.ds-input-panel,
.ds-output-panel {
  height: 100%;
}

.ds-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ds-panel-header .btn {
  white-space: nowrap;
}

.ds-body {
  display: flex;
  flex-direction: column;
}

.ds-field {
  margin-bottom: 16px;
}

.ds-field .ds-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-primary, #212529);
}

.ds-url-input {
  font-family: Consolas, Menlo, monospace;
  font-size: 13.5px;
}

.ds-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary, #5f6b7a);
  line-height: 1.5;
}

.ds-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ds-chip {
  border: 1px solid var(--border-color, #dde1e6);
  background: var(--panel-bg, #fff);
  color: var(--text-primary, #212529);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.ds-chip:hover {
  border-color: var(--brand-color, #2f6fed);
  color: var(--brand-color, #2f6fed);
}

.ds-recent {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 26px;
}

.ds-recent.is-empty {
  min-height: auto;
}

.ds-recent-empty {
  font-size: 12px;
  color: var(--text-secondary, #5f6b7a);
}

.ds-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px dashed var(--border-color, #dde1e6);
  background: var(--panel-bg, #fff);
  color: var(--text-secondary, #5f6b7a);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-recent-chip:hover {
  border-color: var(--brand-color, #2f6fed);
  border-style: solid;
  color: var(--brand-color, #2f6fed);
}

.ds-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ds-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* ---- output side ---- */
.ds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  border: 1px dashed var(--border-color, #dde1e6);
  border-radius: 8px;
  color: var(--text-secondary, #5f6b7a);
  text-align: center;
  padding: 20px;
}

.ds-empty i {
  font-size: 40px;
  opacity: 0.45;
}

.ds-empty p {
  margin: 0;
  font-size: 13px;
  max-width: 320px;
  line-height: 1.6;
}

.ds-empty.hidden {
  display: none;
}

.ds-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ds-result.hidden {
  display: none;
}

.ds-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-radius: 10px;
  color: #fff;
  padding: 20px 22px;
}

.ds-hero.is-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.ds-hero.is-redirect {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.ds-hero.is-client_error {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.ds-hero.is-server_error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.ds-hero.is-informational,
.ds-hero.is-unknown {
  background: linear-gradient(135deg, #475569, #64748b);
}

.ds-hero-code {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  font-family: Consolas, Menlo, monospace;
}

.ds-hero-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.ds-hero-status {
  font-size: 19px;
  font-weight: 700;
}

.ds-hero-label {
  font-size: 13px;
  opacity: 0.88;
  line-height: 1.45;
}

.ds-hero-badge {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
}

.ds-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ds-metric {
  border: 1px solid var(--border-color, #e3e6ea);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  background: var(--panel-bg, #fff);
}

.ds-metric-value {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary, #212529);
  line-height: 1.25;
  font-family: Consolas, Menlo, monospace;
}

.ds-metric-value.is-fast {
  color: #16a34a;
}

.ds-metric-value.is-slow {
  color: #dc2626;
}

.ds-metric-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary, #5f6b7a);
  margin-top: 4px;
}

.ds-section {
  border: 1px solid var(--border-color, #e3e6ea);
  border-radius: 8px;
  padding: 12px 14px;
}

.ds-section.hidden {
  display: none;
}

.ds-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary, #5f6b7a);
  margin-bottom: 8px;
}

.ds-final-url {
  display: block;
  font-size: 13px;
  color: var(--brand-color, #2f6fed);
  word-break: break-all;
  line-height: 1.5;
}

/* redirect chain */
.ds-chain {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ds-chain-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-subtle, #f8f9fa);
}

.ds-chain-code {
  font-family: Consolas, Menlo, monospace;
  font-weight: 700;
  min-width: 46px;
}

.ds-chain-code.is-redirect {
  color: #2563eb;
}

.ds-chain-code.is-final {
  color: #16a34a;
}

.ds-chain-url {
  color: var(--text-secondary, #5f6b7a);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.ds-chain-arrow {
  color: var(--text-secondary, #5f6b7a);
  font-size: 12px;
}

/* headers */
.ds-headers {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border-color, #e3e6ea);
  border-radius: 6px;
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
}

.ds-header-row {
  display: flex;
  gap: 10px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border-color, #edf0f3);
  word-break: break-all;
}

.ds-header-row:last-child {
  border-bottom: none;
}

.ds-header-row:hover {
  background: var(--bg-subtle, #f8f9fa);
}

.ds-header-name {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand-color, #2f6fed);
  min-width: 150px;
}

.ds-header-value {
  color: var(--text-primary, #212529);
  min-width: 0;
}

.ds-result .result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.ds-meta-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.ds-output-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ds-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 16px;
  transition: opacity 0.25s ease;
}

.ds-message.is-fading {
  opacity: 0;
}

.ds-message.hidden {
  display: none;
}

.ds-msg-error {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #c0392b;
}

.ds-msg-success {
  background: rgba(40, 167, 69, 0.08);
  border: 1px solid rgba(40, 167, 69, 0.35);
  color: #1e7e34;
}

.ds-msg-info {
  background: rgba(47, 111, 237, 0.07);
  border: 1px solid rgba(47, 111, 237, 0.3);
  color: var(--brand-color, #2f6fed);
}

[data-theme='dark'] .ds-msg-error {
  color: #f08a8a;
}

[data-theme='dark'] .ds-msg-success {
  color: #7fd88f;
}

[data-theme='dark'] .ds-msg-info {
  color: #7fb0ff;
}

.ds-note {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary, #5f6b7a);
  line-height: 1.6;
  background: var(--bg-subtle, #f8f9fa);
  border: 1px solid var(--border-color, #e3e6ea);
  border-radius: 8px;
  padding: 10px 12px;
}

.ds-note i {
  margin-top: 2px;
}

/* ---- responsive ---- */
@media (max-width: 991px) {
  .ds-panels [class*='col-'] {
    margin-bottom: 16px;
  }
  .ds-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .ds-hero-code {
    font-size: 44px;
  }
}

@media (max-width: 575px) {
  .ds-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .ds-hero {
    padding: 16px;
  }
  .ds-hero-code {
    font-size: 38px;
  }
  .ds-hero-badge {
    margin-left: auto;
  }
  .ds-header-name {
    min-width: 110px;
  }
  .ds-result .result-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ds-output-actions .btn {
    flex: 1;
  }
}

/* dark mode tweaks */
[data-theme='dark'] .ds-metric,
[data-theme='dark'] .ds-section {
  background: var(--panel-bg, #1e2430);
}

[data-theme='dark'] .ds-header-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme='dark'] .ds-chain-step {
  background: rgba(255, 255, 255, 0.04);
}
