/**
 * @file driver-portal.css
 * @description 司機端專用樣式 (大字體、高對比、手持觸控最佳化)
 */

.driver-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

/* 頂部導航列 */
.driver-header {
  height: var(--header-height);
  background-color: var(--primary);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.driver-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.driver-badge {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* 主操作區 */
.driver-main {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 車輛選擇與狀態卡片 */
.vehicle-selector-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.vehicle-selector-card label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.vehicle-select {
  width: 100%;
  height: var(--touch-target);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--bg-surface);
}

/* 車輛鎖定互斥警告卡 */
.vehicle-lock-alert {
  background: #fef2f2;
  border: 2px solid var(--danger);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.vehicle-lock-alert .icon {
  font-size: 1.8rem;
  line-height: 1;
}

.vehicle-lock-alert h3 {
  color: var(--danger);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.vehicle-lock-alert p {
  font-size: 0.88rem;
  color: #7f1d1d;
  line-height: 1.4;
}

/* 出車里程資訊條 */
.trip-info-banner {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trip-info-item .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trip-info-item .val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* 停靠點時間軸 (動態軌跡) */
.stops-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stop-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.stop-item.start {
  border-left: 5px solid var(--primary);
}

.stop-item.waypoint {
  border-left: 5px solid var(--warning);
}

.stop-item .stop-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 48px;
  flex-shrink: 0;
}

.stop-item .stop-details {
  flex: 1;
}

.stop-item .stop-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.stop-item .stop-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 巨大操作按鈕群 */
.action-buttons {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}

.btn-large {
  width: 100%;
  height: 58px;
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}
.btn-primary:active {
  background-color: var(--primary-hover);
  transform: scale(0.98);
}

.btn-warning {
  background-color: var(--warning);
  color: var(--text-inverse);
}

/* 返場基地醒目提示按鈕 (帶脈動光暈) */
.btn-return-base {
  background-color: var(--success);
  color: var(--text-inverse);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/* 補登連結 */
.retroactive-link {
  text-align: center;
  font-size: 0.88rem;
  color: var(--primary);
  text-decoration: underline;
  padding: 8px;
  cursor: pointer;
}
