:root {
  --order-chat-bottom-offset: 24px;
  --order-chat-footer-lift: 0px;
  --damyth-modal-z: 3000;
}

body.order-chat-has-footer {
  --order-chat-bottom-offset: 24px;
}

.order-chat-widget {
  bottom: calc(var(--order-chat-bottom-offset, 24px) + var(--order-chat-footer-lift, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  right: 22px;
  z-index: 2400;
}

.order-chat-launcher {
  align-items: center;
  align-self: flex-end;
  background: #151515;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.order-chat-launcher:hover,
.order-chat-launcher:focus-visible {
  background: #26272B;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
  transform: translateY(-1px);
}

.order-chat-launcher:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.24);
  outline-offset: 4px;
}

.order-chat-launcher__icon {
  font-size: 1rem;
  line-height: 1;
}

.order-chat-unread-badge {
  align-items: center;
  background: #0F0F10;
  border: 2px solid #FFFFFF;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  justify-content: center;
  min-height: 22px;
  min-width: 22px;
  padding: 0 6px;
  position: absolute;
  right: -6px;
  top: -7px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-chat-panel {
  background: #151515;
  border: 1px solid #303134;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(680px, calc(var(--order-chat-visual-height, 100dvh) - var(--order-chat-footer-lift, 0px) - 92px));
  max-height: min(680px, calc(var(--order-chat-visual-height, 100dvh) - var(--order-chat-footer-lift, 0px) - 92px));
  min-height: 0;
  overflow: hidden;
  width: min(420px, calc(100vw - 32px));
}

.order-chat-head {
  align-items: flex-start;
  border-bottom: 1px solid #303134;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 16px 12px;
}

.order-chat-head h2 {
  color: #FFFFFF;
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
}

.order-chat-head p {
  color: #8A8A8A;
  font-size: 0.8rem;
  line-height: 1.35;
  margin: 3px 0 0;
}

.order-chat-close {
  align-items: center;
  background: #202124;
  border: 0;
  border-radius: 999px;
  color: #B8B8B8;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: 1.25rem;
  height: 32px;
  justify-content: center;
  line-height: 1;
  width: 32px;
}

.order-chat-tabs {
  border-bottom: 1px solid #303134;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
}

.order-chat-tab {
  align-items: center;
  background: #202124;
  border: 1px solid #303134;
  border-radius: 999px;
  color: #B8B8B8;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 7px;
  max-width: 180px;
  min-height: 34px;
  padding: 0 12px;
}

.order-chat-tab.is-active {
  background: #151515;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.order-chat-tab__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-chat-tab__badge {
  align-items: center;
  background: #0F0F10;
  border-radius: 999px;
  color: #FFFFFF;
  display: inline-flex;
  font-size: 0.68rem;
  justify-content: center;
  min-height: 18px;
  min-width: 18px;
  padding: 0 5px;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-chat-messages {
  background: #0F0F10;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

/* Phase 5B bounded-history controls stay inside the conversation scroller. */
.order-chat-history-control {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.order-chat-history-control[hidden] {
  display: none;
}

.order-chat-history-control__button {
  align-items: center;
  background: #26272b;
  border: 1px solid #4a4b50;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 14px;
}

.order-chat-history-control__button:hover {
  background: #303136;
}

.order-chat-history-control__button:focus-visible {
  outline: 3px solid #8ab4f8;
  outline-offset: 2px;
}

.order-chat-history-control__button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.order-chat-history-control__error,
.order-chat-history-control__status {
  color: #b8b8b8;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.order-chat-new-updates {
  align-self: center;
  min-height: 44px;
  margin: 8px 12px;
  padding: 8px 16px;
  border: 1px solid #b8d5ff;
  border-radius: 999px;
  background: #eef6ff;
  color: #174f8f;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.order-chat-new-updates[hidden] {
  display: none;
}

.order-chat-new-updates:focus-visible {
  outline: 3px solid rgba(30, 111, 196, 0.3);
  outline-offset: 2px;
}

.order-chat-update-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.order-chat-history-initial-error {
  gap: 10px;
}

@media (max-width: 480px) {
  .order-chat-history-control {
    align-items: stretch;
    flex-direction: column;
  }

  .order-chat-history-control__button {
    width: 100%;
  }
}

.order-chat-empty,
.order-chat-status {
  color: #8A8A8A;
  font-size: 0.86rem;
  padding: 12px;
  text-align: center;
}

.order-chat-status {
  background: #151515;
  border-top: 1px solid #303134;
  padding: 8px 14px;
}

.order-chat-status--error {
  color: #B8B8B8;
}

.order-chat-status--loading {
  color: #8A8A8A;
}

.order-chat-message {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 86%;
}

.order-chat-message--own {
  align-items: flex-end;
  align-self: flex-end;
}

.order-chat-message--system {
  max-width: 94%;
}

.order-chat-message__meta {
  color: #8A8A8A;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  gap: 6px;
  padding: 0 4px;
}

.order-chat-bubble {
  background: #151515;
  border: 1px solid #303134;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.order-chat-message--own .order-chat-bubble {
  background: #151515;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.order-chat-message--system .order-chat-bubble {
  background: #26272B;
  border-color: #303134;
}

.order-chat-item-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-chat-item-card {
  align-items: center;
  background: #202124;
  border: 1px solid #303134;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 8px;
}

.order-chat-item-card img,
.order-chat-item-card__thumb {
  background: #303134;
  border-radius: 6px;
  display: block;
  flex: 0 0 46px;
  height: 46px;
  object-fit: cover;
  width: 46px;
}

.order-chat-item-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-chat-item-card__meta strong {
  color: #FFFFFF;
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.order-chat-item-card__meta span {
  color: #8A8A8A;
  font-size: 0.78rem;
}

.order-chat-composer {
  align-items: flex-end;
  background: #151515;
  border-top: 1px solid #303134;
  display: flex;
  gap: 8px;
  padding: 12px;
}

.order-chat-input {
  border: 1px solid #303134;
  border-radius: 8px;
  flex: 1 1 auto;
  font: inherit;
  font-size: 0.9rem;
  max-height: 120px;
  min-height: 42px;
  outline: none;
  padding: 10px 11px;
  resize: vertical;
}

.order-chat-input:focus {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

.order-chat-send {
  background: #151515;
  border: 0;
  border-radius: 8px;
  color: #FFFFFF;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  min-height: 42px;
  padding: 0 14px;
}

.order-chat-send:disabled {
  cursor: wait;
  opacity: 0.6;
}

@media (max-width: 640px) {
  body.order-chat-has-footer {
    --order-chat-bottom-offset: 14px;
  }
  .order-chat-widget {
    bottom: calc(var(--order-chat-bottom-offset, 14px) + var(--order-chat-footer-lift, 0px));
    left: 12px;
    right: 12px;
  }

  .order-chat-launcher {
    min-height: 48px;
  }

  .order-chat-panel {
    border-radius: 12px 12px 10px 10px;
    width: 100%;
  }

  .order-chat-messages {
    min-height: 0;
  }

  .order-chat-message {
    max-width: 92%;
  }

  .order-chat-message--system {
    max-width: 100%;
  }

  .order-chat-composer {
    align-items: stretch;
  }

  .order-chat-input {
    resize: none;
  }
}
.order-chat-attach {
  background: #202124;
  border: 1px solid #303134;
  border-radius: 8px;
  color: #FFFFFF;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 42px;
  padding: 0 11px;
}

.order-chat-attach:hover,
.order-chat-attach:focus-visible {
  background: #2C2D31;
  outline: none;
}

.order-chat-attach:focus-visible {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

.order-chat-attach:disabled {
  cursor: wait;
  opacity: 0.6;
}

.order-chat-attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.order-chat-attachment-card {
  align-items: center;
  background: #202124;
  border: 1px solid #303134;
  border-radius: 8px;
  color: inherit;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  text-decoration: none;
}

.order-chat-attachment-card:hover,
.order-chat-attachment-card:focus-visible {
  border-color: #303134;
  outline: none;
}

.order-chat-attachment-card__icon {
  align-items: center;
  background: #303134;
  border-radius: 6px;
  color: #B8B8B8;
  display: inline-flex;
  flex: 0 0 44px;
  font-size: 0.68rem;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  text-transform: uppercase;
  width: 44px;
}

.order-chat-attachment-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-chat-attachment-card__meta strong,
.order-chat-attachment-card__meta span {
  overflow-wrap: anywhere;
}

.order-chat-attachment-card__meta strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.order-chat-attachment-card__meta span {
  color: #8A8A8A;
  font-size: 0.74rem;
}

.order-chat-message--own .order-chat-attachment-card {
  background: #26272B;
  border-color: #303134;
}

.order-chat-message--own .order-chat-attachment-card__icon {
  background: #1C1C1E;
  color: #FFFFFF;
}

.order-chat-message--own .order-chat-attachment-card__meta span {
  color: #8A8A8A;
}

@media (max-width: 640px) {
  .order-chat-attach,
  .order-chat-send {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.order-chat-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.order-chat-panel.has-thread-list {
  width: min(800px, calc(100vw - 32px));
}

.order-chat-thread-list {
  background: #151515;
  border-right: 1px solid #303134;
  display: flex;
  flex: 0 0 230px;
  flex-direction: column;
  gap: 8px;
  max-width: 230px;
  min-width: 0;
  overflow-y: auto;
  padding: 10px;
}

.order-chat-thread-list[hidden] {
  display: none;
}

.order-chat-conversation {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.order-chat-panel.has-thread-list .order-chat-tabs {
  display: none;
}

.order-chat-thread-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #303134;
  border-radius: 0;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 11px 10px;
  text-align: left;
  transition: background 0.16s ease;
  width: 100%;
}

.order-chat-thread-row:hover,
.order-chat-thread-row:focus-visible {
  background: #303134;
  outline: none;
}

.order-chat-thread-row.is-active {
  background: #34363B;
}

.order-chat-thread-avatar {
  align-items: center;
  background: #26272B;
  border-radius: 999px;
  color: #B8B8B8;
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 0.82rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  overflow: hidden;
  width: 36px;
}

.order-chat-thread-avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.order-chat-thread-avatar--placeholder {
  text-transform: uppercase;
}

.order-chat-thread-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.order-chat-thread-name-line {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.order-chat-thread-name-line strong {
  color: #FFFFFF;
  flex: 1 1 auto;
  font-size: 0.86rem;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-chat-thread-preview {
  color: #8A8A8A;
  font-size: 0.76rem;
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-chat-thread-preview--subtle {
  color: #8A8A8A;
}

.order-chat-thread-badge {
  align-items: center;
  background: #0F0F10;
  border-radius: 999px;
  color: #FFFFFF;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 900;
  justify-content: center;
  min-height: 16px;
  min-width: 16px;
  padding: 0 5px;
}
/* Dark premium marketplace styling for the customer order chat widget. */
.order-chat-widget {
  color: #FFFFFF;
}

.order-chat-panel {
  background: #151515;
  border: 1px solid #303134;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.order-chat-head {
  background: #1C1C1E;
  border-bottom: 1px solid #303134;
}

.order-chat-head h2 {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
}

.order-chat-head p {
  color: #8A8A8A;
}

.order-chat-close {
  background: #26272B;
  color: #B8B8B8;
  transition: background 150ms ease, color 150ms ease;
}

.order-chat-close:hover,
.order-chat-close:focus-visible {
  background: #2C2D31;
  color: #FFFFFF;
  outline: none;
}

.order-chat-body {
  background: #151515;
}

.order-chat-thread-list {
  background: #151515;
  border-right: 1px solid #303134;
  gap: 0;
  padding: 0;
}

.order-chat-thread-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #303134;
  border-radius: 0;
  box-shadow: none;
  color: #FFFFFF;
  cursor: pointer;
  gap: 12px;
  margin: 0;
  min-height: 62px;
  padding: 11px 12px;
  transition: background 150ms ease;
}

.order-chat-thread-row:hover,
.order-chat-thread-row:focus-visible {
  background: #2C2D31;
  box-shadow: none;
  outline: none;
}

.order-chat-thread-row.is-active {
  background: #34363B;
  box-shadow: none;
}

.order-chat-thread-avatar {
  background: #26272B;
  color: #B8B8B8;
  flex-basis: 38px;
  font-size: 0.84rem;
  height: 38px;
  width: 38px;
}

.order-chat-thread-name-line strong {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.order-chat-thread-preview {
  color: #8A8A8A;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.order-chat-thread-preview--subtle {
  color: #8A8A8A;
}

.order-chat-thread-badge,
.order-chat-tab__badge,
.order-chat-unread-badge {
  background: #0F0F10;
  border: 1px solid #303134;
  color: #FFFFFF;
  font-size: 0.66rem;
  font-weight: 800;
  min-height: 18px;
  min-width: 18px;
  padding: 0 5px;
}

.order-chat-unread-badge {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
}

.order-chat-conversation {
  background: #0F0F10;
}

.order-chat-tabs {
  background: #151515;
  border-bottom: 1px solid #303134;
}

.order-chat-tab {
  background: #202124;
  border: 1px solid #303134;
  color: #B8B8B8;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.order-chat-tab:hover,
.order-chat-tab:focus-visible {
  background: #2C2D31;
  color: #FFFFFF;
  outline: none;
}

.order-chat-tab.is-active {
  background: #34363B;
  border-color: #303134;
  color: #FFFFFF;
}

.order-chat-messages {
  background: #0F0F10;
  gap: 14px;
  padding: 16px;
  scrollbar-color: #3A3A3A #151515;
  scrollbar-width: thin;
}

.order-chat-thread-list {
  scrollbar-color: #3A3A3A #151515;
  scrollbar-width: thin;
}

.order-chat-messages::-webkit-scrollbar,
.order-chat-thread-list::-webkit-scrollbar {
  width: 8px;
}

.order-chat-messages::-webkit-scrollbar-track,
.order-chat-thread-list::-webkit-scrollbar-track {
  background: #151515;
}

.order-chat-messages::-webkit-scrollbar-thumb,
.order-chat-thread-list::-webkit-scrollbar-thumb {
  background: #3A3A3A;
  border-radius: 999px;
}

.order-chat-messages::-webkit-scrollbar-thumb:hover,
.order-chat-thread-list::-webkit-scrollbar-thumb:hover {
  background: #4A4A4A;
}

.order-chat-message {
  max-width: 70%;
}

.order-chat-message--system {
  max-width: 70%;
}

.order-chat-message__meta {
  color: #8A8A8A;
}

.order-chat-bubble {
  background: #26272B;
  border: 1px solid #303134;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 11px 13px;
}

.order-chat-message--own .order-chat-bubble {
  background: #202124;
  border-color: #303134;
  color: #FFFFFF;
}

.order-chat-message--system .order-chat-bubble {
  background: #26272B;
  border-color: #303134;
  color: #FFFFFF;
}

.order-chat-item-card,
.order-chat-attachment-card {
  background: #202124;
  border: 1px solid #303134;
  color: #FFFFFF;
}

.order-chat-item-card img,
.order-chat-item-card__thumb,
.order-chat-attachment-card__icon {
  background: #1C1C1E;
  color: #B8B8B8;
}

.order-chat-item-card__meta strong,
.order-chat-attachment-card__meta strong {
  color: #FFFFFF;
}

.order-chat-item-card__meta span,
.order-chat-attachment-card__meta span {
  color: #8A8A8A;
}

.order-chat-message--own .order-chat-attachment-card {
  background: #26272B;
  border-color: #303134;
}

.order-chat-message--own .order-chat-attachment-card__icon {
  background: #1C1C1E;
  color: #B8B8B8;
}

.order-chat-message--own .order-chat-attachment-card__meta span {
  color: #8A8A8A;
}

.order-chat-empty,
.order-chat-status {
  color: #8A8A8A;
}

.order-chat-status {
  background: #151515;
  border-top: 1px solid #303134;
}

.order-chat-status--error {
  color: #B8B8B8;
}

.order-chat-status--loading {
  color: #8A8A8A;
}

.order-chat-composer {
  background: #151515;
  border-top: 1px solid #303134;
  gap: 8px;
}

.order-chat-input {
  background: #202124;
  border: 1px solid #303134;
  color: #FFFFFF;
}

.order-chat-input::placeholder {
  color: #8A8A8A;
}

.order-chat-input:focus {
  border-color: #303134;
  box-shadow: none;
}

.order-chat-send,
.order-chat-attach {
  background: #202124;
  border: 1px solid #303134;
  color: #FFFFFF;
  transition: background 150ms ease, border-color 150ms ease;
}

.order-chat-send:hover,
.order-chat-send:focus-visible,
.order-chat-attach:hover,
.order-chat-attach:focus-visible {
  background: #2C2D31;
  border-color: #303134;
  box-shadow: none;
  outline: none;
}

.order-chat-send:disabled,
.order-chat-attach:disabled {
  color: #8A8A8A;
  opacity: 1;
}

.order-chat-launcher {
  background: #151515;
  border: 1px solid #303134;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  color: #FFFFFF;
}

.order-chat-launcher:hover,
.order-chat-launcher:focus-visible {
  background: #2C2D31;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
}

.order-chat-launcher:focus-visible {
  outline: 2px solid #303134;
  outline-offset: 4px;
}

/* Modern icon composer polish. */
.order-chat-close {
  font-size: 0.95rem;
  font-weight: 700;
}

.order-chat-composer {
  align-items: stretch;
  background: #151515;
  border-top: 1px solid #303134;
  display: block;
  padding: 12px;
}

.order-chat-composer-shell {
  align-items: center;
  background: #202124;
  border: 1px solid #303134;
  border-radius: 18px;
  display: flex;
  gap: 8px;
  min-height: 48px;
  padding: 6px 7px 6px 14px;
  transition: background 150ms ease, border-color 150ms ease;
}

.order-chat-composer-shell:focus-within {
  background: #202124;
  border-color: #303134;
}

.order-chat-input {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #FFFFFF;
  flex: 1 1 auto;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
  max-height: 120px;
  min-height: 24px;
  outline: none;
  padding: 7px 4px 7px 0;
  resize: none;
}

.order-chat-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.order-chat-input::placeholder {
  color: #8A8A8A;
}

.order-chat-composer-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.order-chat-attach,
.order-chat-send {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #8A8A8A;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  min-height: 34px;
  padding: 0;
  transition: background 150ms ease, color 150ms ease;
  width: 34px;
}

.order-chat-attach svg,
.order-chat-send svg {
  display: block;
  height: 18px;
  width: 18px;
}

.order-chat-attach:hover,
.order-chat-attach:focus-visible,
.order-chat-send:hover,
.order-chat-send:focus-visible {
  background: #2C2D31;
  color: #FFFFFF;
  outline: none;
}

.order-chat-attach:active,
.order-chat-send:active {
  background: #34363B;
  color: #FFFFFF;
}

.order-chat-attach:disabled,
.order-chat-send:disabled {
  background: transparent;
  color: #8A8A8A;
  cursor: wait;
  opacity: 1;
}

@media (max-width: 640px) {
  .order-chat-composer {
    padding: 10px;
  }

  .order-chat-composer-shell {
    min-height: 46px;
    padding-left: 12px;
  }
}

.order-chat-thread-name-line {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.order-chat-thread-name-line strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-chat-thread-name-meta {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  margin-left: 8px;
  max-width: 76px;
}

.order-chat-thread-time {
  color: #8A8A8A;
  flex: 0 0 auto;
  font-size: 0.75rem;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.order-chat-thread-name-meta .order-chat-thread-badge {
  min-height: 16px;
  min-width: 16px;
}

.order-chat-panel[hidden] {
  display: none !important;
}

.order-chat-close {
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.order-chat-order-ref {
  color: #B8B8B8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.thread-timeline-card {
  align-items: flex-start;
  align-self: center;
  background: #FFFFFF;
  border: 1px solid #DADDE3;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  color: #151515;
  display: flex;
  gap: 12px;
  margin: 6px auto;
  max-width: 440px;
  padding: 14px;
  width: min(100%, 440px);
}

.thread-timeline-card__icon {
  align-items: center;
  background: #F2F3F5;
  border: 1px solid #E4E5E7;
  border-radius: 999px;
  color: #151515;
  display: inline-flex;
  flex: 0 0 38px;
  font-size: 1.05rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.thread-timeline-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.thread-timeline-card__title {
  color: #111111;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.thread-timeline-card__description {
  color: #4B4F57;
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.thread-timeline-card__reminder {
  background: #26272B;
  border: 1px solid #303134;
  border-radius: 10px;
  color: #B8B8B8;
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding: 10px;
}

.thread-timeline-card__reminder p {
  color: #B8B8B8;
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.thread-timeline-card__reminder-link {
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thread-timeline-card__reminder-link:hover,
.thread-timeline-card__reminder-link:focus-visible {
  color: #FFFFFF;
  outline: none;
}
.thread-timeline-card__meta {
  color: #777D86;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
}

.thread-timeline-card__details {
  border-top: 1px solid #E6E8EC;
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 9px;
}

.thread-timeline-card__detail {
  display: grid;
  gap: 2px;
}

.thread-timeline-card__detail span {
  color: #777D86;
  font-size: 0.72rem;
  font-weight: 700;
}

.thread-timeline-card__detail strong {
  color: #151515;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.thread-timeline-card__link {
  align-self: flex-start;
  background: #151515;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 2px;
  padding: 7px 11px;
  text-decoration: none;
}

.thread-timeline-card__link:hover,
.thread-timeline-card__link:focus-visible {
  background: #34363B;
  outline: none;
}

@media (max-width: 640px) {
  .thread-timeline-card {
    max-width: 100%;
    padding: 12px;
  }
}

/* Dark timeline cards for structured order events */
.thread-timeline-card {
  align-items: flex-start;
  align-self: center;
  background: #202124;
  border: 1px solid #303134;
  border-radius: 14px;
  box-shadow: none;
  color: #FFFFFF;
  display: flex;
  gap: 12px;
  margin: 8px auto;
  max-width: 440px;
  padding: 14px;
  width: min(100%, 440px);
}

.thread-timeline-card__icon {
  align-items: center;
  background: #26272B;
  border: 1px solid #303134;
  border-radius: 999px;
  color: #FFFFFF;
  display: inline-flex;
  flex: 0 0 38px;
  font-size: 1.05rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.thread-timeline-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.thread-timeline-card__order-code {
  color: #8A8A8A;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.thread-timeline-card__title {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.thread-timeline-card__description {
  color: #B8B8B8;
  font-size: 0.84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.thread-timeline-card__reminder {
  background: #26272B;
  border: 1px solid #303134;
  border-radius: 10px;
  color: #B8B8B8;
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding: 10px;
}

.thread-timeline-card__reminder p {
  color: #B8B8B8;
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.thread-timeline-card__reminder-link {
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thread-timeline-card__reminder-link:hover,
.thread-timeline-card__reminder-link:focus-visible {
  color: #FFFFFF;
  outline: none;
}
.thread-timeline-card__meta {
  color: #8A8A8A;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
}

.thread-timeline-card__details {
  border-top: 1px solid #303134;
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding-top: 9px;
}

.thread-timeline-card__detail {
  display: grid;
  gap: 2px;
}

.thread-timeline-card__detail span {
  color: #8A8A8A;
  font-size: 0.72rem;
  font-weight: 700;
}

.thread-timeline-card__detail strong {
  color: #FFFFFF;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.thread-timeline-card__link {
  align-self: flex-start;
  background: #26272B;
  border: 1px solid #303134;
  border-radius: 999px;
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 2px;
  padding: 7px 11px;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease;
}

.thread-timeline-card__link:hover,
.thread-timeline-card__link:focus-visible {
  background: #2C2D31;
  border-color: #303134;
  color: #FFFFFF;
  outline: none;
}

.thread-timeline-card__actions {
  border-top: 1px solid #303134;
  display: grid;
  gap: 9px;
  margin-top: 6px;
  padding-top: 10px;
}

.thread-timeline-card__action-title {
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.thread-timeline-card__action-helper {
  color: #8A8A8A;
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 0;
}

.thread-timeline-card__action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thread-timeline-card__action-row--left {
  justify-content: flex-start;
}

.thread-timeline-card__action {
  background: #FFFFFF;
  border: 1px solid #FFFFFF;
  border-radius: 999px;
  color: #0F0F10;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 7px 11px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.thread-timeline-card__action--secondary {
  background: #26272B;
  border-color: #303134;
  color: #FFFFFF;
}

.thread-timeline-card__action:hover,
.thread-timeline-card__action:focus-visible {
  background: #E8E8E8;
  border-color: #E8E8E8;
  outline: none;
}

.thread-timeline-card__action--secondary:hover,
.thread-timeline-card__action--secondary:focus-visible {
  background: #2C2D31;
  border-color: #303134;
  color: #FFFFFF;
}

.thread-timeline-card__action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.thread-timeline-card__note {
  background: #151515;
  border: 1px solid #303134;
  border-radius: 10px;
  box-sizing: border-box;
  color: #FFFFFF;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 72px;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}

.thread-timeline-card__note::placeholder {
  color: #8A8A8A;
}

.thread-timeline-card__note:focus {
  border-color: #4A4A4A;
  outline: none;
}
body.order-chat-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.order-chat-confirm {
  align-items: center;
  background: rgba(15, 15, 16, 0.74);
  box-sizing: border-box;
  display: flex;
  height: var(--order-chat-modal-visual-height, 100vh);
  justify-content: center;
  left: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  position: fixed;
  right: 0;
  top: 0;
  z-index: var(--damyth-modal-z, 3000);
}

.order-chat-confirm[hidden] {
  display: none;
}

.order-chat-confirm__panel {
  background: #202124;
  border: 1px solid #303134;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
  color: #FFFFFF;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: 100%;
  max-width: 420px;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
  width: min(100%, 420px);
}

.order-chat-confirm__title {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
  padding-bottom: 10px;
}

.order-chat-confirm__body {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.order-chat-confirm__content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.order-chat-confirm__body p {
  color: #B8B8B8;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}
.order-chat-confirm__field {
  color: #FFFFFF;
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 8px;
  margin-top: 12px;
}

.order-chat-confirm__field[hidden] {
  display: none;
}

.order-chat-confirm__field textarea {
  background: #151515;
  border: 1px solid #303134;
  border-radius: 10px;
  box-sizing: border-box;
  color: #FFFFFF;
  font: inherit;
  line-height: 1.45;
  min-height: 96px;
  outline: none;
  padding: 10px 12px;
  resize: vertical;
  width: 100%;
}

.order-chat-confirm__field textarea::placeholder {
  color: #8A8A8A;
}

.order-chat-confirm__field textarea:focus {
  border-color: #4A4A4A;
}

.order-chat-confirm__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 18px;
}

.order-chat-confirm__button {
  background: #FFFFFF;
  border: 1px solid #FFFFFF;
  border-radius: 999px;
  color: #0F0F10;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 14px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.order-chat-confirm__button--secondary {
  background: #26272B;
  border-color: #303134;
  color: #FFFFFF;
}

.order-chat-confirm__button:hover,
.order-chat-confirm__button:focus-visible {
  background: #E8E8E8;
  border-color: #E8E8E8;
  outline: none;
}

.order-chat-confirm__button--secondary:hover,
.order-chat-confirm__button--secondary:focus-visible {
  background: #2C2D31;
  border-color: #303134;
  color: #FFFFFF;
}

.order-chat-confirm__button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.order-chat-confirm__error,
.order-chat-confirm__status {
  color: #FCA5A5;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.order-chat-confirm__status[hidden] {
  display: none;
}

@supports (height: 100dvh) {
  .order-chat-confirm {
    height: var(--order-chat-modal-visual-height, 100dvh);
  }
}

@media (max-width: 640px) {
  .order-chat-confirm {
    align-items: flex-end;
    padding:
      max(10px, env(safe-area-inset-top, 0px))
      max(10px, env(safe-area-inset-right, 0px))
      max(10px, env(safe-area-inset-bottom, 0px))
      max(10px, env(safe-area-inset-left, 0px));
  }

  .order-chat-confirm__panel {
    padding: 16px;
  }

  .order-chat-confirm__actions {
    flex-direction: column-reverse;
  }

  .order-chat-confirm__button {
    min-height: 44px;
    width: 100%;
  }

  .order-chat-confirm__field textarea {
    font-size: 16px;
    min-height: 96px;
  }
}

.thread-timeline-card__details--instructions {
  gap: 8px;
}

.thread-timeline-card__instruction-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.thread-timeline-card__instruction-title {
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1.35;
}

.thread-timeline-card__instruction-text,
.thread-timeline-card__instruction-helper {
  color: #B8B8B8;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.thread-timeline-card__instruction-files {
  color: #8A8A8A;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.thread-timeline-card__attachments {
  margin-top: 8px;
}

/* Phase 3 authoritative customer conversation-shell contract. */
:root {
  --order-chat-mobile-control-target: 44px;
  --order-chat-shell-padding: 12px;
}

body.order-chat-customer-stage-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.order-chat-panel[aria-hidden="true"],
.order-chat-panel[inert] {
  pointer-events: none;
}

.order-chat-body,
.order-chat-conversation {
  min-height: 0;
  overflow: hidden;
}

.order-chat-conversation {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.order-chat-messages {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.order-chat-status[hidden] {
  display: none;
}

/* Persistent secondary resolution controls share the composer footer, not history. */
.order-chat-negotiation-review[hidden] { display: none; }
.order-chat-negotiation-review {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #303134;
  min-width: 0;
}
.order-chat-negotiation-review__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.order-chat-negotiation-review__copy {
  color: #b9b9bd;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.order-chat-negotiation-review__button {
  border: 1px solid #555;
  border-radius: 8px;
  background: transparent;
  color: #eee;
  font: inherit;
  font-size: 0.8rem;
  min-height: 44px;
  padding: 8px 12px;
  max-width: 100%;
  white-space: normal;
  cursor: pointer;
}
.order-chat-negotiation-review__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 760px), (max-height: 500px) and (max-width: 900px) {
  body.order-chat-customer-stage-open .order-chat-widget {
    bottom: auto;
    gap: 0;
    height: var(--order-chat-visual-height, 100dvh);
    left: 0;
    right: 0;
    top: var(--order-chat-visual-top, 0px);
    width: 100%;
  }

  body.order-chat-customer-stage-open .order-chat-launcher {
    display: none;
  }

  body.order-chat-customer-stage-open .order-chat-panel,
  body.order-chat-customer-stage-open .order-chat-panel.has-thread-list {
    border: 0;
    border-radius: 0;
    height: 100%;
    max-height: none;
    width: 100%;
  }

  .order-chat-head {
    min-height: var(--order-chat-mobile-control-target);
    padding:
      max(8px, env(safe-area-inset-top, 0px))
      max(var(--order-chat-shell-padding), env(safe-area-inset-right, 0px))
      8px
      max(var(--order-chat-shell-padding), env(safe-area-inset-left, 0px));
  }

  .order-chat-close {
    flex-basis: var(--order-chat-mobile-control-target);
    height: var(--order-chat-mobile-control-target);
    min-height: var(--order-chat-mobile-control-target);
    width: var(--order-chat-mobile-control-target);
  }

  .order-chat-body {
    display: flex;
    flex-direction: column;
  }

  .order-chat-thread-list {
    display: none;
  }

  .order-chat-panel.has-thread-list .order-chat-tabs {
    display: flex;
  }

  .order-chat-tabs {
    min-height: var(--order-chat-mobile-control-target);
    overflow-x: auto;
    overflow-y: hidden;
    padding:
      4px
      max(var(--order-chat-shell-padding), env(safe-area-inset-right, 0px))
      4px
      max(var(--order-chat-shell-padding), env(safe-area-inset-left, 0px));
    scrollbar-width: none;
  }

  .order-chat-tabs::-webkit-scrollbar {
    display: none;
  }

  .order-chat-tab {
    max-width: min(68vw, 240px);
    min-height: var(--order-chat-mobile-control-target);
  }

  .order-chat-messages {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-left: max(var(--order-chat-shell-padding), env(safe-area-inset-left, 0px));
    padding-right: max(var(--order-chat-shell-padding), env(safe-area-inset-right, 0px));
  }

  .order-chat-status {
    overflow-wrap: anywhere;
    padding-left: max(var(--order-chat-shell-padding), env(safe-area-inset-left, 0px));
    padding-right: max(var(--order-chat-shell-padding), env(safe-area-inset-right, 0px));
  }

  .order-chat-composer {
    padding:
      8px
      max(var(--order-chat-shell-padding), env(safe-area-inset-right, 0px))
      max(8px, env(safe-area-inset-bottom, 0px))
      max(var(--order-chat-shell-padding), env(safe-area-inset-left, 0px));
  }

  .order-chat-composer-shell {
    min-height: 52px;
  }

  .order-chat-input {
    font-size: 16px;
    max-height: 96px;
    min-height: 24px;
    overflow-y: hidden;
  }

  .order-chat-attach,
  .order-chat-send {
    flex-basis: var(--order-chat-mobile-control-target);
    height: var(--order-chat-mobile-control-target);
    min-height: var(--order-chat-mobile-control-target);
    width: var(--order-chat-mobile-control-target);
  }
}

@media (max-height: 500px) and (max-width: 900px) {
  .order-chat-head {
    align-items: center;
    padding-bottom: 6px;
    padding-top: max(4px, env(safe-area-inset-top, 0px));
  }

  .order-chat-head p {
    display: none;
  }

  .order-chat-tabs {
    padding-bottom: 2px;
    padding-top: 2px;
  }

  .order-chat-composer {
    padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
    padding-top: 4px;
  }
}

/* Phase 4 authoritative customer timeline and attachment presentation. */
.thread-timeline-card {
  border-left: 3px solid #4A4A4A;
}

.thread-timeline-card--progress {
  border-left-color: #64748B;
}

.thread-timeline-card--action {
  border-left-color: #F59E0B;
}

.thread-timeline-card--success {
  border-left-color: #22C55E;
}

.thread-timeline-card--warning {
  border-left-color: #F97316;
}

.thread-timeline-card__icon {
  flex-basis: 32px;
  font-size: 0.78rem;
  height: 32px;
  width: 32px;
}

.thread-timeline-card__summary {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.thread-timeline-card__summary .thread-timeline-card__title {
  flex: 1 1 auto;
  min-width: 0;
}

.thread-timeline-card__summary .thread-timeline-card__meta {
  flex: 0 1 auto;
  margin: 0;
  max-width: 46%;
  text-align: right;
}

.thread-timeline-card__order-code {
  opacity: 0.72;
}

.thread-timeline-card__summary-counts {
  color: #B8B8B8;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.thread-timeline-card__expanded {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.thread-timeline-card__expanded[hidden],
.thread-timeline-card__disclosure[hidden] {
  display: none;
}

.thread-timeline-card__toggle {
  align-items: center;
  align-self: flex-start;
  background: #202124;
  border: 1px solid #3A3A3A;
  border-radius: 999px;
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  min-height: 44px;
  padding: 0 13px;
}

.thread-timeline-card__toggle:hover,
.thread-timeline-card__toggle:focus-visible {
  background: #2C2D31;
  outline: 2px solid #8A8A8A;
  outline-offset: 2px;
}

.thread-timeline-card__description,
.thread-timeline-card__detail,
.thread-timeline-card__detail strong,
.thread-timeline-card__instruction-text,
.thread-timeline-card__instruction-helper,
.thread-timeline-card__instruction-files {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.thread-timeline-card__actions {
  margin-top: 2px;
}

.thread-timeline-card__action,
.thread-timeline-card__link,
.thread-timeline-card__reminder-link {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
}

.thread-timeline-card__reminder {
  gap: 6px;
  padding: 9px 10px;
}

.thread-timeline-card__reminder p {
  margin: 0;
}

.thread-timeline-card__details--instructions {
  gap: 9px;
}

.thread-timeline-card__instruction-item {
  padding: 9px 0;
}

.thread-timeline-card__instruction-helper {
  border-top: 1px solid #303134;
  padding-top: 9px;
}

.order-chat-attachment-list {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.order-chat-attachment-list.is-many {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-chat-attachment-list__summary {
  color: #B8B8B8;
  font-size: 0.76rem;
  font-weight: 800;
  grid-column: 1 / -1;
}

.order-chat-attachment-card {
  box-sizing: border-box;
  min-height: 52px;
  min-width: 0;
  overflow: hidden;
  padding: 6px;
}

.order-chat-attachment-card:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.order-chat-attachment-card.is-unavailable {
  cursor: not-allowed;
  opacity: 0.68;
}

.order-chat-attachment-card__visual {
  align-items: center;
  background: #1C1C1E;
  border-radius: 7px;
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  overflow: hidden;
  width: 44px;
}

.order-chat-attachment-card__thumbnail {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.order-chat-attachment-card__thumbnail + .order-chat-attachment-card__icon {
  display: none;
}

.order-chat-attachment-card__icon {
  background: transparent;
  border-radius: 0;
  flex: 0 0 auto;
  font-size: 0.62rem;
  height: auto;
  letter-spacing: 0.02em;
  min-height: 0;
  min-width: 0;
  width: auto;
}

.order-chat-attachment-card__meta strong,
.order-chat-attachment-card__meta span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 640px) {
  .thread-timeline-card {
    gap: 9px;
    padding: 10px;
  }

  .thread-timeline-card__summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .thread-timeline-card__summary .thread-timeline-card__meta {
    max-width: 100%;
    text-align: left;
  }

  .thread-timeline-card__action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .thread-timeline-card__action,
  .thread-timeline-card__link,
  .thread-timeline-card__reminder-link {
    box-sizing: border-box;
    width: 100%;
  }
}

@media (max-width: 350px) {
  .order-chat-attachment-list.is-many {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thread-timeline-card__toggle,
  .thread-timeline-card__action,
  .order-chat-attachment-card {
    scroll-behavior: auto;
    transition: none;
  }
}
.customer-issue-evidence { margin-top: 12px; }
.customer-issue-evidence h4 { margin: 0 0 8px; font-size: 14px; }
.customer-issue-evidence-card { display: inline-flex; align-items: center; gap: 10px; margin: 0 8px 8px 0; padding: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #222; cursor: pointer; }
.customer-issue-evidence-card img { width: 72px; height: 72px; object-fit: contain; }
.customer-issue-evidence-modal .order-chat-confirm__panel { position: relative; width: min(760px, calc(100vw - 32px)); max-height: 90dvh; overflow: auto; background: #fff; color: #222; box-shadow: none; }
.customer-issue-evidence-media { display: block; width: 100%; max-height: 65dvh; object-fit: contain; }
.customer-issue-evidence-close { position: absolute; top: 8px; right: 12px; border: 0; background: #fff; font-size: 24px; cursor: pointer; }
