/* Driver chat is isolated from the owner inbox and shared booking form. */
.driver-chat-dialog { width: min(600px, calc(100vw - 24px)); max-width: 600px; max-height: min(850px, calc(100dvh - 24px)); padding: 0; border: 1px solid #dbe3f2; border-radius: 20px; color: #213452; background: #fff; box-shadow: 0 22px 80px #12285238; overflow: hidden; }
.driver-chat-dialog::backdrop { background: #13244388; backdrop-filter: blur(3px); }
.driver-chat-shell { display: flex; flex-direction: column; height: min(780px, calc(100dvh - 28px)); min-height: 0; }
.driver-chat-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 22px 22px 14px; flex-shrink: 0; }
.driver-chat-eyebrow { display: block; color: #718097; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.driver-chat-header h2 { margin: 5px 0; font-size: 22px; line-height: 1.25; color: #233d80; }
.driver-chat-header p { margin: 0; color: #60718b; font-size: 13px; overflow-wrap: anywhere; }
.driver-chat-header button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f1f4fa; color: #65758f; font: inherit; font-size: 28px; cursor: pointer; }
.driver-chat-notice { margin: 0 18px; padding: 11px 13px; border-radius: 10px; color: #233d80; background: #edf3ff; font-size: 12px; line-height: 1.5; flex-shrink: 0; }
.driver-chat-lifecycle { margin: 9px 22px 12px; color: #718097; font-size: 10px; line-height: 1.45; flex-shrink: 0; }
.driver-chat-messages { display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; min-height: 90px; overflow-y: auto; overscroll-behavior: contain; padding: 18px; background: #f7f9fd; border-top: 1px solid #e7ecf5; border-bottom: 1px solid #e7ecf5; }
.driver-chat-message { max-width: 88%; width: fit-content; padding: 11px 13px; border: 1px solid #dbe3ef; border-radius: 14px 14px 14px 3px; background: white; align-self: flex-start; }
.driver-chat-message--outbound { align-self: flex-end; background: #233d80; color: #fff; border-color: #233d80; border-radius: 14px 14px 3px 14px; }
.driver-chat-author { display: block; font-size: 10px; font-weight: 700; opacity: .75; }
.driver-chat-message p { margin: 5px 0 7px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.driver-chat-message--outbound p { color: inherit; }
.driver-chat-message small { font-size: 9px; line-height: 1.5; opacity: .75; display: block; }
.driver-chat-empty { margin: auto; text-align: center; max-width: 310px; padding: 24px 8px; color: #6b7b93; }
.driver-chat-empty > span { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 15px; background: #e8eefb; color: #233d80; font-size: 26px; }
.driver-chat-empty strong { display: block; font-size: 15px; color: #324c7b; }
.driver-chat-empty p, .driver-chat-loading { font-size: 12px; line-height: 1.6; }
.driver-chat-status { margin: 0; padding: 0 18px; font-size: 11px; line-height: 1.5; color: #526884; flex-shrink: 0; }
.driver-chat-status:not(:empty) { padding-top: 10px; }
.driver-chat-status[data-kind="warning"] { color: #8a5c13; }
.driver-chat-compose { padding: 12px 18px 18px; flex-shrink: 0; }
.driver-chat-shortcuts { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-width: 0; }
.driver-chat-compose .driver-chat-shortcuts button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 5px; border-color: #d6e0f2; background: #f3f6fd; color: #344f86; font-size: 10px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.driver-chat-replies { margin-bottom: 10px; min-width: 0; }
.driver-chat-replies-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #324968; font-size: 11px; font-weight: 600; }
.driver-chat-compose .driver-chat-replies-heading button { min-height: 44px; padding: 4px 8px; border-color: transparent; background: transparent; color: #536c9b; font-size: 10px; }
.driver-chat-replies > p { margin: 0 0 6px; color: #718097; font-size: 10px; line-height: 1.4; }
[data-chat-replies-browser] { display: flex; gap: 6px; margin-bottom: 7px; }
[data-chat-replies-browser][hidden] { display: none; }
.driver-chat-replies input, .driver-chat-replies select { width: 50%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid #cdd8ec; border-radius: 9px; background: #fff; color: #324968; font: inherit; font-size: 12px; box-sizing: border-box; }
.driver-chat-replies select[hidden] { display: none; }
.driver-chat-replies .driver-chat-shortcuts:empty { display: none; }
.driver-chat-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.driver-chat-compose label { display: block; margin-bottom: 7px; color: #324968; font-size: 12px; font-weight: 600; }
.driver-chat-compose textarea { display: block; width: 100%; min-height: 82px; padding: 11px 12px; border: 1px solid #cdd8ec; border-radius: 10px; resize: vertical; max-height: 160px; background: #fff; color: #213452; font: inherit; font-size: 16px; line-height: 1.45; box-sizing: border-box; }
.driver-chat-compose textarea:disabled { background: #f3f5f9; color: #718097; }
.driver-chat-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.driver-chat-compose-footer small { font-size: 9px; color: #718097; max-width: 140px; }
.driver-chat-compose button { flex-shrink: 0; min-height: 44px; padding: 10px 16px; border: 1px solid #233d80; border-radius: 9px; background: #233d80; color: #fff; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.driver-chat-compose button:disabled { opacity: .5; cursor: default; }
.driver-chat-dialog button:focus-visible, .driver-chat-compose textarea:focus-visible, .driver-chat-launch:focus-visible { outline: 3px solid #8dafff; outline-offset: 3px; }
.driver-chat-card { padding: 0 12px 12px; }
.driver-chat-launch { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #c5d4f2; border-radius: 9px; background: #edf3ff; color: #233d80; font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.driver-chat-panel { grid-column: 1 / -1; padding: 12px; border: 1px solid #dbe4f3; border-radius: 12px; }
[data-driver-chat-slot] { grid-column: 1 / -1; }
.driver-chat-panel > p { margin: 8px 3px 0; font-size: 11px; line-height: 1.5; color: #6b7d96; }
.driver-chat-locked { grid-column: 1 / -1; padding: 12px 14px; margin: 0; border-radius: 10px; background: #f1f4fa; color: #6b7b94; font-size: 12px; }
@media (max-width: 480px) { .driver-chat-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; } .driver-chat-shell { height: calc(100dvh - 20px); } .driver-chat-header { padding: 17px 16px 12px; } .driver-chat-header h2 { font-size: 20px; } .driver-chat-notice { margin-inline: 12px; font-size: 11px; } .driver-chat-lifecycle { margin: 8px 16px 10px; } .driver-chat-messages { padding: 14px 12px; } .driver-chat-compose { padding: 12px 12px max(14px, env(safe-area-inset-bottom)); } }
@media (max-height: 760px) {
  .driver-chat-header { padding: 10px 14px 8px; align-items: center; } .driver-chat-eyebrow, .driver-chat-lifecycle { display: none; } .driver-chat-header h2 { margin: 0 0 3px; font-size: 17px; } .driver-chat-header p { font-size: 11px; } .driver-chat-notice { padding: 7px 10px; margin-bottom: 7px; font-size: 10px; } .driver-chat-messages { min-height: 40px; padding: 9px 12px; gap: 9px; } .driver-chat-message { padding: 8px 10px; } .driver-chat-status { font-size: 10px; } .driver-chat-status:not(:empty) { padding-top: 5px; } .driver-chat-compose { padding: 8px 12px max(9px, env(safe-area-inset-bottom)); } .driver-chat-shortcuts { margin-bottom: 5px; } .driver-chat-compose label { margin-bottom: 4px; font-size: 11px; } .driver-chat-compose textarea { height: 53px; min-height: 53px; max-height: 65px; padding: 7px 10px; } .driver-chat-compose-footer { margin-top: 7px; } .driver-chat-compose button { min-height: 44px; padding: 8px 12px; }
  .driver-chat-replies { display: grid; grid-template-columns: minmax(0, 1fr) 44px; column-gap: 6px; margin-bottom: 7px; }
  .driver-chat-replies-heading { grid-column: 2; grid-row: 1; } .driver-chat-replies-heading > span { display: none; } .driver-chat-compose .driver-chat-replies-heading button { width: 44px; padding: 4px 0; font-size: 9px; }
  [data-chat-replies-browser], .driver-chat-replies .driver-chat-shortcuts { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  [data-chat-replies-browser]:not([hidden]) ~ .driver-chat-shortcuts { display: none; }
  .driver-chat-replies > p { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; }
  .driver-chat-replies > p[data-replies-state="ready"] { display: none; }
}
