.admin-driver-chat-alert {
  display: flex;
  min-width: 220px;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  text-align: left;
}

.admin-driver-chat-alert.has-unread {
  color: #fff;
  border-color: transparent;
  background: transparent;
}

.admin-driver-chat-alert:hover,
.admin-driver-chat-alert:focus-visible {
  background: rgba(255,255,255,.06);
  border-radius: 12px;
}

.admin-driver-chat-alert.is-opening {
  cursor: wait;
  opacity: .78;
}

.admin-driver-chat-alert-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 0;
  color: #ff6508;
  background: transparent;
  font-size: 19px;
}

.admin-driver-chat-alert-copy {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.admin-driver-chat-alert-copy small {
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  opacity: .68;
  text-transform: uppercase;
}

.admin-driver-chat-alert.has-unread .admin-driver-chat-alert-copy small {
  color: #fff;
}

.admin-driver-chat-alert-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-driver-chat-alert-count {
  display: grid;
  flex: 0 0 25px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: transparent;
  font-size: 10px;
  font-weight: 900;
}

.admin-driver-chat-alert-count.is-empty {
  color: #fff;
  background: transparent;
  opacity: .68;
}

.driver-admin-chat-window {
  position: fixed;
  display: grid;
  width: min(390px, calc(100vw - 20px));
  max-height: min(680px, calc(100dvh - 20px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(23,25,29,.18);
  border-radius: 22px;
  background: #f6f6f4;
  box-shadow: 0 26px 70px rgba(16,18,22,.28);
  transition: width .18s ease, box-shadow .18s ease, transform .18s ease;
}

.driver-admin-chat-window.is-dragging {
  box-shadow: 0 34px 88px rgba(16,18,22,.36);
  transform: scale(1.008);
  transition: none;
  user-select: none;
}

.driver-admin-chat-window.has-new-message {
  box-shadow: 0 0 0 4px rgba(255,101,8,.32), 0 26px 70px rgba(16,18,22,.30);
}

.driver-admin-chat-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 14px;
  color: #fff;
  background: #17191d;
  cursor: grab;
  touch-action: none;
}

.driver-admin-chat-window.is-dragging .driver-admin-chat-header {
  cursor: grabbing;
}

.driver-admin-chat-icon,
.driver-admin-chat-controls button {
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
}

.driver-admin-chat-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #ff6508;
  font-size: 19px;
}

.driver-admin-chat-heading {
  min-width: 0;
}

.driver-admin-chat-heading span {
  display: block;
  overflow: hidden;
  color: #ff8c49;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.driver-admin-chat-heading h2 {
  overflow: hidden;
  margin: 2px 0;
  color: #fff;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-admin-chat-heading p {
  overflow: hidden;
  margin: 0;
  color: #adb3bb;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-admin-chat-controls {
  display: flex;
  gap: 6px;
}

.driver-admin-chat-controls button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #2b2e33;
  cursor: pointer;
}

.driver-admin-chat-controls button:hover {
  background: #41454b;
}

.driver-admin-chat-body {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(240px, 1fr) auto;
}

.driver-admin-chat-window.is-minimized {
  width: min(286px, calc(100vw - 20px));
  grid-template-rows: auto;
  border-radius: 17px;
}

.driver-admin-chat-window.is-minimized .driver-admin-chat-body {
  display: none;
}

.driver-admin-chat-window.is-minimized .driver-admin-chat-header {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 9px;
}

.driver-admin-chat-window.is-minimized .driver-admin-chat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
}

.driver-admin-chat-window.is-minimized .driver-admin-chat-heading span,
.driver-admin-chat-window.is-minimized .driver-admin-chat-heading p {
  display: none;
}

.driver-admin-chat-window.is-minimized .driver-admin-chat-heading h2 {
  margin: 0;
  font-size: 12px;
}

.driver-admin-chat-window.is-minimized .driver-admin-chat-controls button {
  width: 30px;
  height: 30px;
}

.driver-admin-chat-quick {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  overflow-x: auto;
  border-bottom: 1px solid #e5e5e1;
  background: #fff;
}

.driver-admin-chat-quick button {
  flex: 0 0 auto;
  border: 1px solid #deded9;
  border-radius: 999px;
  padding: 6px 9px;
  color: #34383d;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
}

.driver-admin-chat-quick button:hover {
  color: #ff6508;
  border-color: #ffb68b;
}

.driver-admin-chat-messages {
  display: flex;
  min-height: 240px;
  max-height: 420px;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 15px;
  overscroll-behavior: contain;
}

.driver-admin-message {
  width: fit-content;
  max-width: 82%;
  padding: 9px 11px;
  border-radius: 15px;
}

.driver-admin-message.mine {
  align-self: flex-end;
  color: #fff;
  border-bottom-right-radius: 4px;
  background: #17191d;
}

.driver-admin-message.theirs {
  align-self: flex-start;
  color: #22252a;
  border: 1px solid #e2e2de;
  border-bottom-left-radius: 4px;
  background: #fff;
}

.driver-admin-message strong,
.driver-admin-message small {
  display: block;
  font-size: 8px;
}

.driver-admin-message p {
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.45;
}

.driver-admin-message small {
  opacity: .64;
  text-align: right;
}

.driver-admin-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 8px;
  padding: 11px;
  border-top: 1px solid #e4e4df;
  background: #fff;
}

.driver-admin-chat-compose textarea {
  min-height: 46px !important;
  resize: none;
  border: 1px solid #dadbd7;
  border-radius: 13px;
  padding: 10px 12px;
  outline: 0;
  font-size: 12px;
}

.driver-admin-chat-compose textarea:focus {
  border-color: #ff6508;
  box-shadow: 0 0 0 3px rgba(255,101,8,.12);
}

.driver-admin-chat-compose button {
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: #ff6508;
}

.driver-admin-chat-loading,
.driver-admin-chat-empty {
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #767c84;
  text-align: center;
}

.driver-admin-chat-loading .spinner-border {
  width: 24px;
  height: 24px;
  color: #ff6508;
}

.driver-admin-chat-empty i {
  color: #ff6508;
  font-size: 28px;
}

.driver-admin-chat-empty p {
  max-width: 300px;
  margin: 0;
  font-size: 10px;
}

.driver-admin-chat-empty.is-error i {
  color: #dc3545;
}

@media (max-width: 720px) {
  .admin-driver-chat-alert {
    min-width: 0;
    max-width: calc(100vw - 148px);
  }

  .admin-driver-chat-alert-copy strong {
    max-width: 130px;
  }

  .driver-admin-chat-window {
    width: min(360px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .driver-admin-chat-header {
    padding: 11px;
  }

  .driver-admin-chat-messages {
    min-height: 220px;
    max-height: 48dvh;
  }
}

.admin-chat-alerts {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.admin-business-chat-alert.has-unread {
  border-color: transparent;
  background: transparent;
}

.admin-business-chat-alert .admin-driver-chat-alert-icon {
  color: #ff6508;
  background: transparent;
}

.admin-business-chat-alert.has-unread .admin-driver-chat-alert-copy small {
  color: #fff;
}

.admin-business-chat-alert .admin-driver-chat-alert-count:not(.is-empty) {
  background: transparent;
}

.business-admin-chat-window .driver-admin-chat-header {
  background:
    radial-gradient(circle at 92% 12%, rgba(35,166,116,.28), transparent 31%),
    #132d26;
}

.business-admin-chat-window .driver-admin-chat-icon {
  background: linear-gradient(145deg, #ff7418, #f05200);
}

.business-admin-chat-window .driver-admin-chat-heading span {
  color: #8de0bc;
}

.business-admin-chat-window .driver-admin-chat-compose button {
  background: #159a69;
}

.business-admin-chat-window .driver-admin-chat-compose textarea:focus {
  border-color: #159a69;
  box-shadow: 0 0 0 3px rgba(21,154,105,.13);
}

.business-admin-chat-window .driver-admin-chat-quick button:hover {
  color: #087a53;
  border-color: #8ed8bd;
}

@media (max-width: 980px) {
  .admin-chat-alerts {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-chat-alerts::-webkit-scrollbar {
    display: none;
  }

  .admin-chat-alerts .admin-driver-chat-alert {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .admin-chat-alerts {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 42px 42px;
    gap: 5px;
  }

  .admin-chat-alerts .admin-driver-chat-alert {
    position: relative;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    min-height: 42px;
    padding: 3px;
    overflow: visible;
    border-radius: 0;
  }

  .admin-chat-alerts .admin-driver-chat-alert-icon {
    width: 34px;
    height: 34px;
  }

  .admin-chat-alerts .admin-driver-chat-alert-copy {
    display: none;
  }

  .admin-chat-alerts .admin-driver-chat-alert-count {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 19px;
    height: 19px;
    font-size: 8px;
    color: #fff;
    background: transparent;
    box-shadow: none;
  }
}
