.fast-chat-panel {
  width: 100%;
  max-width: 560px;
  height: min(660px, calc(100vh - 156px));
  min-height: 520px;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(43, 44, 47, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #2b2c2f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.fast-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(43, 44, 47, 0.08);
}

.fast-chat-title {
  font: 600 15px/1.2 "General Sans", system-ui, sans-serif;
}

.fast-chat-session-code {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(43, 44, 47, 0.08);
  background: #fff;
  color: #5f6672;
  font: 500 11px/1.2 "General Sans", system-ui, sans-serif;
}

.fast-chat-session-code[data-visible="true"] {
  display: flex;
}

.fast-chat-session-code span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fast-chat-session-code strong {
  margin-left: 4px;
  color: #2b2c2f;
  font: 600 11px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.fast-chat-session-code button {
  min-width: 44px;
  border: 0;
  background: transparent;
  color: #2b2c2f;
  cursor: pointer;
  padding: 2px 0;
  text-align: right;
  font: 600 11px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fast-chat-copy,
.fast-chat-addresses,
.fast-chat-reset,
.fast-chat-signin {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(43, 44, 47, 0.12);
  border-radius: 6px;
  background: #fff;
  color: #2b2c2f;
  cursor: pointer;
  font: 600 12px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-signin {
  max-width: 132px;
  min-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fast-chat-copy {
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fast-chat-address-card {
  margin-bottom: 12px;
  border: 1px solid rgba(43, 44, 47, 0.08);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.fast-chat-address-list {
  display: grid;
  gap: 8px;
}

.fast-chat-address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(43, 44, 47, 0.08);
}

.fast-chat-address-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.fast-chat-address-row strong,
.fast-chat-address-row span {
  display: block;
}

.fast-chat-address-row strong {
  color: #2b2c2f;
  font: 600 12px/1.3 "General Sans", system-ui, sans-serif;
}

.fast-chat-address-row span {
  color: #5f6672;
  font: 400 11px/1.35 "General Sans", system-ui, sans-serif;
}

.fast-chat-address-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fast-chat-address-actions button,
.fast-chat-address-default {
  border: 0;
  background: transparent;
  color: #5f6672;
  cursor: pointer;
  font: 600 11px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-address-default {
  cursor: default;
}

.fast-chat-messages {
  overflow-y: auto;
  padding: 16px;
  background: #f6f7f9;
}

.fast-chat-privacy {
  padding: 8px 14px;
  border-top: 1px solid rgba(43, 44, 47, 0.08);
  background: #fff;
  color: #5f6672;
  font: 400 11px/1.35 "General Sans", system-ui, sans-serif;
}

.fast-chat-message {
  max-width: 88%;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font: 400 14px/1.45 "General Sans", system-ui, sans-serif;
  white-space: pre-wrap;
}

.fast-chat-message.user {
  margin-left: auto;
  background: #2b2c2f;
  color: #fff;
}

.fast-chat-message.assistant {
  background: #fff;
  color: #2b2c2f;
  border: 1px solid rgba(43, 44, 47, 0.08);
}

.fast-chat-status {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  color: #5f6672;
  font: 500 13px/1.3 "General Sans", system-ui, sans-serif;
}

.fast-chat-status::after {
  content: "";
  width: 18px;
  overflow: hidden;
  animation: fast-chat-dots 1.2s steps(4, end) infinite;
}

@keyframes fast-chat-dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75%, 100% { content: "..."; }
}

.fast-chat-products {
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
}

.fast-chat-product {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(43, 44, 47, 0.08);
  border-radius: 8px;
  background: #fff;
}

.fast-chat-product-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.fast-chat-product img,
.fast-chat-product-placeholder {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  background: #eceef2;
}

.fast-chat-product-title {
  margin: 0;
  color: #2b2c2f;
  font: 600 13px/1.3 "General Sans", system-ui, sans-serif;
}

.fast-chat-product-meta {
  margin-top: 4px;
  color: #5f6672;
  font: 400 12px/1.3 "General Sans", system-ui, sans-serif;
}

.fast-chat-checkout-badge {
  display: inline-block;
  max-width: 100%;
  margin-left: auto;
  color: #5f6672;
  text-align: right;
  font: 500 11px/1.2 "General Sans", system-ui, sans-serif;
}

.fast-chat-product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.fast-chat-small-button {
  border: 1px solid rgba(43, 44, 47, 0.12);
  border-radius: 6px;
  background: #fff;
  color: #2b2c2f;
  cursor: pointer;
  padding: 7px 10px;
  font: 600 12px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-small-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fast-chat-small-button.danger {
  border-color: rgba(178, 42, 42, 0.24);
  color: #9f2626;
}

.fast-chat-quote-form-card,
.fast-chat-signin-card,
.fast-chat-card-form-card,
.fast-chat-funding-card,
.fast-chat-quote-pending-card,
.fast-chat-quote-card,
.fast-chat-payment-card,
.fast-chat-order-card {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid rgba(43, 44, 47, 0.08);
  border-radius: 8px;
  background: #fff;
}

.fast-chat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fast-chat-card-head strong,
.fast-chat-card-head span {
  display: block;
}

.fast-chat-card-head strong {
  color: #2b2c2f;
  font: 600 13px/1.25 "General Sans", system-ui, sans-serif;
}

.fast-chat-card-head span {
  margin-top: 2px;
  color: #5f6672;
  font: 400 12px/1.35 "General Sans", system-ui, sans-serif;
}

.fast-chat-icon-button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 0;
  border-radius: 6px;
  background: #f1f2f4;
  color: #5f6672;
  cursor: pointer;
  font: 600 16px/1 system-ui, sans-serif;
}

.fast-chat-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fast-chat-field {
  display: grid;
  gap: 5px;
}

.fast-chat-field-wide {
  grid-column: 1 / -1;
}

.fast-chat-field span {
  color: #5f6672;
  font: 600 11px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-field input {
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(43, 44, 47, 0.16);
  border-radius: 6px;
  padding: 9px 10px;
  color: #2b2c2f;
  font: 400 13px/1.2 "General Sans", system-ui, sans-serif;
}

.fast-chat-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.fast-chat-quote-rows {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.fast-chat-quote-rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fast-chat-quote-rows dt,
.fast-chat-quote-rows dd {
  margin: 0;
  font: 400 12px/1.3 "General Sans", system-ui, sans-serif;
}

.fast-chat-quote-rows dt {
  color: #5f6672;
}

.fast-chat-quote-rows dd {
  color: #2b2c2f;
  font-weight: 600;
}

.fast-chat-quote-total {
  padding-top: 10px;
  border-top: 1px solid rgba(43, 44, 47, 0.08);
  color: #2b2c2f;
  font: 700 16px/1.2 "General Sans", system-ui, sans-serif;
}

.fast-chat-payment-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.fast-chat-payment-button {
  width: 100%;
  border: 1px solid rgba(43, 44, 47, 0.12);
  border-radius: 7px;
  background: #2b2c2f;
  color: #fff;
  cursor: pointer;
  padding: 10px 12px;
  font: 600 13px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-payment-button:disabled {
  cursor: not-allowed;
  background: #eceef2;
  color: #8a9099;
}

.fast-chat-payment-reason {
  margin-top: -4px;
  color: #8a9099;
  font: 400 11px/1.35 "General Sans", system-ui, sans-serif;
}

.fast-chat-payment-unavailable {
  padding: 10px 12px;
  border: 1px solid rgba(43, 44, 47, 0.08);
  border-radius: 6px;
  background: #f6f7f9;
  color: #5f6672;
  font: 500 12px/1.35 "General Sans", system-ui, sans-serif;
}

.fast-chat-payment-status {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(43, 44, 47, 0.08);
  border-radius: 8px;
  background: #fff;
  color: #2b2c2f;
  font: 600 12px/1.35 "General Sans", system-ui, sans-serif;
}

.fast-chat-funding-iframe {
  display: block;
  width: 100%;
  height: 500px;
  margin-top: 12px;
  border: 1px solid rgba(43, 44, 47, 0.08);
  border-radius: 8px;
  background: #fff;
}

.fast-chat-order-link {
  display: inline-flex;
  margin-top: 10px;
  color: #2b2c2f;
  font: 600 12px/1 "General Sans", system-ui, sans-serif;
}

.fast-chat-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.fast-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(43, 44, 47, 0.08);
}

.fast-chat-input {
  min-width: 0;
  border: 1px solid rgba(43, 44, 47, 0.16);
  border-radius: 8px;
  padding: 11px 12px;
  font: 400 14px/1.2 "General Sans", system-ui, sans-serif;
}

.fast-chat-send {
  border: 0;
  border-radius: 8px;
  background: #2b2c2f;
  color: #fff;
  cursor: pointer;
  padding: 0 16px;
  font: 600 14px/1 "General Sans", system-ui, sans-serif;
}

@media (max-width: 520px) {
  .fast-chat-panel {
    width: 100%;
    height: min(590px, calc(100vh - 128px));
    min-height: 440px;
  }

  .fast-chat-head {
    align-items: flex-start;
  }

  .fast-chat-head-actions {
    gap: 6px;
  }

  .fast-chat-form-grid {
    grid-template-columns: 1fr;
  }

  .fast-chat-address-row {
    grid-template-columns: 1fr;
  }
}
