/* Cab Istanbul — Driver trip portal (mobile-first) */
:root {
  --bg: #f7f3ea;
  --card: #ffffff;
  --border: #e8ded0;
  --text: #111111;
  --muted: #6b6b6b;
  --accent: #f5a623;
  --dark: #0b0b0b;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.driver-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(32px + var(--safe-bottom));
  min-height: 100vh;
}

.driver-wrap--has-sticky {
  padding-bottom: calc(120px + var(--safe-bottom));
}

.driver-brand {
  text-align: center;
  margin-bottom: 14px;
}

.driver-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.driver-brand span {
  font-size: 12px;
  color: var(--muted);
}

/* Status banner */
.driver-status-banner {
  text-align: center;
  padding: 20px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 14px;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.driver-status-banner__hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

.driver-status-banner--assigned { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.driver-status-banner--accepted { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.driver-status-banner--en_route { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.driver-status-banner--picked_up { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
.driver-status-banner--completed { background: #ecfdf3; border-color: #a7f3d0; color: #065f46; }
.driver-status-banner--cancelled { background: #f3f4f6; border-color: #d1d5db; color: #4b5563; }

.driver-warning-banner {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.driver-completed-note {
  text-align: center;
  padding: 18px 16px;
  margin-bottom: 14px;
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  color: #065f46;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

/* Cards */
.driver-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(11, 11, 11, 0.05);
}

.driver-card h2 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.driver-location-address {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.driver-location-time {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
}

.driver-location-time strong {
  color: var(--text);
  font-weight: 600;
}

.driver-passenger-name {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.driver-phone-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 16px 18px;
  background: var(--dark);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.driver-phone-link:active {
  opacity: 0.92;
  transform: scale(0.99);
}

.driver-phone-link svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.driver-map-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: var(--dark);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.driver-map-btn:active {
  opacity: 0.92;
  transform: scale(0.99);
}

.driver-map-btn svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.driver-notes {
  margin: 0;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.5;
}

/* Alerts */
.driver-alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.driver-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.driver-alert--success {
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* Sticky action footer */
.driver-sticky-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(247, 243, 234, 0) 0%, rgba(247, 243, 234, 0.92) 24%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(11, 11, 11, 0.08);
}

.driver-sticky-footer__inner {
  max-width: 480px;
  margin: 0 auto;
}

.driver-sticky-footer form {
  margin: 0;
}

.driver-action-btn {
  display: block;
  width: 100%;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  min-height: 58px;
  background: var(--dark);
  color: var(--accent);
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.driver-action-btn:active {
  transform: scale(0.99);
  opacity: 0.95;
}

.driver-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.driver-footer a {
  color: var(--muted);
}

@media (min-width: 640px) {
  .driver-wrap {
    padding-top: 24px;
  }

  .driver-status-banner {
    font-size: 20px;
    padding: 22px 20px;
  }

  .driver-sticky-footer {
    position: static;
    padding: 0;
    margin-top: 8px;
    background: none;
    border-top: 0;
    box-shadow: none;
  }

  .driver-wrap--has-sticky {
    padding-bottom: 32px;
  }
}
