/* ============================================
   delivery_tracking.css — 배달 추적 전용 스타일
   원본: mia delivery-tracking.html
   접두사: dlv-
   ============================================ */

/* --- Status Badges --- */
.dlv-badge {
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.dlv-badge-출고 { background: #E0E7FF; color: #3730A3; }
.dlv-badge-상차 { background: #FEF3C7; color: #92400E; }
.dlv-badge-이동중 { background: #DBEAFE; color: #1E40AF; }
.dlv-badge-도착 { background: #D1FAE5; color: #065F46; }
.dlv-badge-인수확인 { background: #86EFAC; color: #15803D; }

/* --- Filter Chips --- */
.dlv-filter-chip {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--tint);
  color: var(--tertiary);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.dlv-filter-chip.dlv-filter-active {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(44, 51, 68, 0.06);
}

/* --- Delivery Table --- */
.dlv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dlv-table thead th {
  background: var(--background);
  color: var(--tertiary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--tint);
}

.dlv-table tbody tr {
  border-bottom: 1px solid var(--tint);
  cursor: pointer;
  transition: background 0.2s;
}

.dlv-table tbody tr:hover {
  background: var(--bg-light);
}

.dlv-table tbody tr.dlv-selected {
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid #3B82F6;
}

.dlv-table tbody td {
  padding: 0.75rem 1rem;
  color: var(--brand);
}

/* --- Timeline --- */
.dlv-timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
}

.dlv-timeline-step:not(:last-child) {
  padding-bottom: 1.5rem;
}

.dlv-timeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  width: 2px;
  height: calc(100% - 16px);
  background: var(--tint);
}

.dlv-timeline-step.dlv-completed:not(:last-child)::before {
  background: #3B82F6;
}

.dlv-timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  border: 2px solid var(--tint);
  background: #fff;
  color: var(--light);
  transition: all 0.3s;
}

.dlv-timeline-step.dlv-completed .dlv-timeline-dot {
  background: #3B82F6;
  border-color: #3B82F6;
  color: #fff;
}

.dlv-timeline-step.dlv-current .dlv-timeline-dot {
  background: #fff;
  border-color: #3B82F6;
  color: #3B82F6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.dlv-timeline-info {
  flex: 1;
}

.dlv-timeline-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dlv-timeline-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}

.dlv-timeline-time {
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
}

.dlv-timeline-info p {
  font-size: 0.75rem;
  color: var(--light);
  margin-top: 2px;
}

.dlv-timeline-step.dlv-future .dlv-timeline-info h4 {
  color: var(--light);
}

.dlv-timeline-step.dlv-future .dlv-timeline-time {
  color: var(--tint);
}

.dlv-timeline-step:not(.dlv-future) .dlv-timeline-time {
  color: var(--light);
}

/* --- Items Table --- */
.dlv-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dlv-items-table thead th {
  background: var(--background);
  color: var(--tertiary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--tint);
}

.dlv-items-table tbody td {
  padding: 0.6rem 0.75rem;
  color: var(--brand);
  border-bottom: 1px solid var(--tint);
}

/* --- Phone Button --- */
.dlv-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EFF6FF;
  color: #2563EB;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.dlv-phone-btn:hover {
  background: #DBEAFE;
}

/* --- Empty State --- */
.dlv-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dlv-empty-state.hidden {
  display: none !important;
}

.dlv-empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  margin-bottom: 1rem;
}

.dlv-empty-icon i {
  font-size: 1.5rem;
  color: var(--light);
}

.dlv-empty-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tertiary);
}

.dlv-empty-desc {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--light);
}

/* --- Detail Card --- */
.dlv-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--tint);
  padding: 1.25rem;
}

.dlv-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 0.25rem;
}

.dlv-card-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}

/* --- Section Title --- */
.dlv-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
}

.dlv-section-title i {
  color: var(--light);
  margin-right: 0.25rem;
}

/* --- Print Button --- */
.dlv-print-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-light);
  color: var(--tertiary);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.dlv-print-btn:hover {
  background: var(--tint);
}

/* --- Left Panel --- */
.dlv-left-panel {
  flex: 4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--tint);
}

/* --- Right Panel --- */
.dlv-right-panel {
  flex: 6;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.25rem;
  gap: 1.25rem;
}

/* --- Realtime Badge --- */
.dlv-realtime-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  background: var(--bg-light);
  color: var(--tertiary);
}
