/**
 * 订单查询页 — 扁平布局，无卡片容器
 * @author Telegram @okgeceo
 */

.ok-order-search-page {
  width: 100%;
  max-width: none;
  padding-top: var(--space-2);
  padding-bottom: var(--space-10);
}

.ok-order-search-panels {
  max-width: 28rem;
}

.ok-order-search-head {
  margin-bottom: var(--space-4);
}

.ok-order-search-head__eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.ok-order-search-head__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.ok-order-search-head__subtitle {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted-foreground);
}

.ok-order-search-tip {
  margin: 0 0 var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--muted-foreground);
}

.ok-order-search-error-msg {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.6;
  color: var(--destructive);
}

.ok-order-search-login-hint {
  margin: 0 0 var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--muted-foreground);
}

.ok-order-search-login-hint a {
  color: var(--foreground);
  font-weight: 500;
  text-decoration: none;
}

.ok-order-search-login-hint a:hover {
  text-decoration: underline;
}

.ok-order-search-tabs {
  display: flex;
  width: 100%;
  max-width: 28rem;
  margin-bottom: var(--space-5);
}

.ok-order-search-tabs .ok-tab {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  padding-inline: var(--space-2);
}

.ok-order-search-panel__hint {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted-foreground);
}

.ok-order-search-form .ok-field {
  margin-bottom: var(--space-4);
}

.ok-order-search-page .ok-auth-input {
  position: relative;
  display: flex;
  align-items: center;
}

.ok-order-search-page .ok-auth-input__icon {
  position: absolute;
  left: var(--space-3);
  z-index: 1;
  display: inline-flex;
  color: var(--muted-foreground);
  pointer-events: none;
}

.ok-order-search-page .ok-auth-input__control {
  padding-left: calc(var(--space-3) + 1.375rem);
}

.ok-order-search-form__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-2);
  max-width: 28rem;
}

.ok-order-search-form__actions .ok-btn {
  min-height: 2.75rem;
  width: 100%;
}

.ok-order-search-form__actions--single {
  grid-template-columns: 1fr;
}

.ok-order-search-form.is-submitting .ok-order-search-form__submit-btn {
  opacity: 0.72;
  cursor: wait;
}

.ok-order-search-form.is-submitting .ok-order-search-form__reset-btn {
  pointer-events: none;
  opacity: 0.5;
}

.ok-order-result-page .ok-section-stack {
  margin-top: var(--space-6);
}

.ok-order-result-head {
  margin-bottom: var(--space-4);
}

.ok-order-result-page > .ok-alert {
  margin-bottom: var(--space-4);
}

.ok-order-result-grid {
  margin-bottom: var(--space-4);
}

.ok-order-search-recent {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid color-mix(in oklch, var(--border) 70%, transparent);
}

.ok-order-search-recent__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.ok-order-search-recent__title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.ok-order-search-recent__count {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted-foreground);
}

.ok-order-search-recent__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ok-order-search-recent__item {
  border-bottom: 1px solid color-mix(in oklch, var(--border) 65%, transparent);
}

.ok-order-search-recent__item:last-child {
  border-bottom: 0;
}

.ok-order-search-recent__pick {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
  padding: var(--space-3) 0;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.ok-order-search-recent__pick:hover {
  opacity: 0.72;
}

.ok-order-search-recent__pick--expired {
  cursor: default;
  pointer-events: none;
}

.ok-order-search-recent__pick--expired:hover {
  opacity: 1;
}

.ok-order-search-recent__sn {
  grid-column: 1 / -1;
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}

.ok-order-search-recent__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.ok-order-search-recent__name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.ok-order-search-recent__name {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ok-order-search-recent__time {
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.ok-order-search-recent__status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.ok-order-search-recent__status .ok-badge {
  max-width: 100%;
  white-space: nowrap;
}

.ok-order-search-recent__view {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--muted-foreground);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out);
}

.ok-order-search-recent__pick:hover .ok-order-search-recent__view {
  color: var(--foreground);
}

@media (max-width: 767px) {
  .ok-order-search-tabs .ok-tab {
    font-size: var(--text-xs);
    height: 1.875rem;
    padding-inline: var(--space-2);
  }

  .ok-order-search-recent__pick {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  .ok-order-search-recent__view {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding: 0 0 var(--space-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ok-order-search-panel[hidden] {
    display: none;
  }
}
