/* Live bidding panel — bright PC/MO */

.bid-live {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
}

.bid-timer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.bid-timer-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.bid-timer-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.bid-timer-value.is-urgent {
  color: var(--danger);
}

.bid-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
}

.bid-stat {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  min-width: 0;
}

.bid-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.bid-stat strong {
  font-size: 1rem;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bid-form {
  display: grid;
  gap: 0.65rem;
}

.bid-form > label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.bid-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 0.45rem;
  align-items: center;
}

.bid-stepper .btn-step {
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  touch-action: manipulation;
}

.bid-stepper .btn-step:hover {
  background: var(--bg-elevated);
}

.bid-stepper .input {
  min-height: 48px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bid-history {
  margin-top: 0.35rem;
}

.bid-history h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.bid-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-height: 220px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.bid-history-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.86rem;
}

.bid-history-list li > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bid-history-list .amt {
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bid-extend-toast {
  display: none;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.bid-extend-toast.is-on {
  display: block;
}

.bid-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.86rem;
}

.bid-msg.is-error {
  color: var(--danger);
}

.bid-msg.is-ok {
  color: var(--accent-strong);
}

.bid-msg a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* PC: sticky auction side panel */
@media (min-width: 1024px) {
  .detail-panel {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }

  .bid-bar-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .bid-bar-mobile {
    display: none !important;
  }
}

/* MO: hide in-panel bid form — use bottom sheet instead */
@media (max-width: 767px) {
  .page.page-detail {
    padding-bottom: calc(6.5rem + var(--tabbar-h));
  }

  .detail-panel {
    padding-bottom: 1.25rem;
  }

  .bid-form-desktop {
    display: none;
  }

  .bid-bar-mobile {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--tabbar-h);
    z-index: var(--z-bid-bar);
    padding: 0.7rem 1rem;
    background: var(--panel-bg);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px) saturate(1.1);
    box-shadow: var(--shadow-sm);
  }

  .bid-bar-mobile .bid-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .bid-bar-mobile .bid-compact .muted {
    font-size: 0.72rem;
  }

  .bid-bar-mobile .bid-compact strong {
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
  }

  .bid-sheet {
    display: none;
  }

  .bid-sheet.is-open {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    animation: rise 0.28s ease both;
    max-height: min(70dvh, calc(100dvh - var(--header-h) - var(--tabbar-h) - 5rem));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bid-sheet-handle {
    width: 2.5rem;
    height: 4px;
    border-radius: 99px;
    background: var(--line-strong);
    margin: -0.15rem auto 0.15rem;
  }
}
