/* ==========================================================================
   多次往返行程小大师 - 模态弹窗、速查卡与 Toast 提示样式 (modal.css)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.hidden { display: none; }

.modal-card {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal-wide { max-width: 860px; }
.modal-sm { max-width: 420px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: #faf9f5;
}

.modal-header h2 { margin: 0; font-size: 18px; color: var(--brand-blue-dark); }
.modal-subtitle { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-muted); }

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

.btn-close {
  border: none;
  background: var(--bg-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-secondary);
}

.btn-close:hover { background: #e2ddd0; color: var(--ink-primary); }

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
}

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 13.5px;
}

.cheat-table th, .cheat-table td {
  border: 1px solid var(--border-light);
  padding: 8px 10px;
  text-align: left;
}

.cheat-table th {
  background: var(--bg-blue-soft);
  color: var(--brand-blue-dark);
}

/* Toast 提示 */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1e293b;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}

.toast-success { background: #15803d; }
.toast-error { background: #dc2626; }
.toast-info { background: #1d4ed8; }

@media print {
  .top-nav, .main-container, .modal-header-actions, .toast-container { display: none !important; }
  .modal-backdrop { position: static; background: none; padding: 0; }
  .modal-card { max-height: none; box-shadow: none; }
}
