/* 頂部導航與語言切換 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}

.brand-badge img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lang {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-lang:active {
  background: var(--border-light);
}

/* PWA 安裝提示橫幅 */
.install-banner {
  background: var(--bg-card);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.install-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-install {
  background: var(--color-primary);
  color: var(--text-white);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* 核心超大貼上大按鈕 (長輩防恐慌焦點) */
.paste-giant-btn {
  width: 100%;
  background: var(--color-primary);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  min-height: 72px;
  transition: transform 0.1s ease, background-color 0.1s ease;
}

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

/* 手動備用輸入欄位 (可折疊/輔助) */
.manual-box {
  display: flex;
  gap: 8px;
  width: 100%;
}

.manual-input {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.manual-input:focus {
  border-color: var(--border-focus);
}

.manual-submit {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  min-width: 64px;
}

/* 狀態載入骨架/提示 */
.status-box {
  text-align: center;
  padding: 12px;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 600;
}

.spinner {
  border: 4px solid #e2e8f0;
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
  margin: 12px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 結果核心主卡片 */
.result-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.place-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  word-break: break-word;
}

/* 司機問路真實地址區塊 (Callout) */
.driver-address-box {
  background: var(--bg-accent);
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.address-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.address-text {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1.45;
  user-select: all;
  word-break: break-word;
}

.btn-copy-address {
  width: 100%;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  min-height: 48px;
}

.btn-copy-address:active {
  background: #bfdbfe;
}

/* 叫車卡片群組 (大按鈕 ≥ 64px) */
.ride-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.ride-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  min-height: 68px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease;
}

.ride-card:active {
  transform: scale(0.98);
}

.ride-card-uber {
  background: var(--color-uber);
  color: var(--color-uber-text);
}

.ride-card-ola {
  background: var(--color-ola);
  color: var(--color-ola-text);
}

.ride-card-rapido {
  background: var(--color-rapido);
  color: var(--color-rapido-text);
}

.ride-arrow {
  font-size: 24px;
}

/* 本地歷史記錄區塊 */
.history-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

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

.history-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
}

.btn-clear-history {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.15s ease;
}

.history-item:active {
  background: var(--bg-surface);
}

.history-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.history-item-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-addr {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-time {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

