/* Shuttle Driver App - Mobile-first styles */
:root {
  --driver-primary: #3675bc;
  --driver-success: #28a745;
  --driver-danger: #dc3545;
  --driver-warning: #f0ad4e;
}

body {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 12px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}

.screen {
  min-height: 60vh;
}

.screen.hidden {
  display: none !important;
}

.driver-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.driver-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.back-link {
  color: var(--driver-primary);
  text-decoration: none;
  font-size: 0.95rem;
}

.session-header {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
}

.session-status {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  color: #666;
}

.session-hint {
  margin: 4px 0 0 0;
  font-size: 0.8rem;
  color: #999;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setup-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.setup-form input,
.setup-form select {
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
}

.setup-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  padding: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.request-card:active {
  background: #f8f9fa;
}

.request-card.accepted {
  opacity: 0.6;
  pointer-events: none;
}

.request-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.request-pickup { font-weight: 600; }
.request-dropoff { color: #666; font-size: 0.95rem; margin-top: 4px; }
.request-meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #666;
}

.request-distance {
  background: var(--driver-primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.status-badge.in-transit { background: #e8f4fd; color: var(--driver-primary); }
.status-badge.arrived { background: #d4edda; color: var(--driver-success); }
.status-badge.canceled { background: #f8d7da; color: var(--driver-danger); }

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: #666; }
.detail-row .value { font-weight: 500; }

.driver-dialog {
  max-width: min(95vw, 400px);
  width: min(400px, calc(100vw - 24px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  overflow: hidden;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.dialog-header h2 { margin: 0; font-size: 1.2rem; }

#requestDetailContent {
  padding: 20px;
  max-height: 50vh;
  overflow-y: auto;
}

.detail-map-box {
  height: 180px;
  width: calc(100% - 40px);
  max-width: 100%;
  margin: 0 20px 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  box-sizing: border-box;
}

.driver-dialog .btnbar-dialog {
  padding: 20px;
  gap: 12px;
}

.active-rides-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.active-ride-card {
  padding: 0;
  overflow: hidden;
}

.active-ride-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}

.active-ride-map {
  height: 160px;
  width: 100%;
  margin: 0 0 12px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  box-sizing: border-box;
}

.active-ride-details {
  padding: 12px 16px 0;
}

.active-ride-card .btnbar {
  padding: 12px 16px 16px;
}

.active-ride-canceled-message {
  padding: 16px;
  border-top: 1px solid #eee;
  background: #f8f9fa;
}

.active-ride-canceled-message .canceled-notice {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: #666;
}

.active-ride-canceled-message .confirm-btn {
  width: 100%;
}

/* Large touch targets for mobile */
button,
input[type="submit"],
.confirm-btn,
.delete-btn,
.secondary {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 16px;
}

.empty-note {
  padding: 24px;
  text-align: center;
  color: #666;
}

.hidden { display: none !important; }

/* Shuttle login page */
.shuttle-login-page {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
}

.shuttle-login-container {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.shuttle-login-container h1 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
}

.shuttle-login-container p {
  margin: 0 0 24px 0;
  color: #666;
  font-size: 0.95rem;
}

.shuttle-login-container .login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shuttle-login-container .login-form input {
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  font-size: 16px;
}

.shuttle-login-container .login-form button {
  margin-top: 8px;
  padding: 14px;
  background: var(--driver-primary, #3675bc);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.shuttle-login-container .error-text {
  margin: 12px 0 0 0;
  color: var(--driver-danger, #dc3545);
  font-size: 0.9rem;
}

.shuttle-login-container .back-to-dashboard {
  display: block;
  margin-top: 20px;
  color: var(--driver-primary, #3675bc);
  text-decoration: none;
  font-size: 0.9rem;
}
