.conversation-page .order-hero {
  padding: 48px 0 32px;
}

body.buyer-conversation-page.public-shell .order-hero {
  padding: clamp(40px, 10vw, 88px) 0 clamp(16px, 3vw, 28px);
}

.conversation-page .order-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.conversation-page .order-hero-inner .eyebrow {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}

.conversation-page .order-hero-inner h1 {
  margin: 0.25em 0 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--ink-900);
}

.conversation-page .section {
  padding-top: 0;
  padding-bottom: 48px;
}

.conversation-page .section .container {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.conversation-page .conversation-back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

.conversation-page .conversation-back-link:hover {
  color: var(--sage-600);
}

.conversation-page .conversation-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.public-shell.conversation-page .conversation-card {
  background: rgba(10, 10, 12, 0.72);
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

body.buyer-conversation-page.public-shell.conversation-page .conversation-card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.buyer-conversation-page.public-shell.conversation-page .conversation-card-head {
  background: color-mix(in srgb, var(--surface-50) 35%, transparent);
  border-bottom-color: var(--border-card);
}

body.buyer-conversation-page.public-shell.conversation-page .conversation-card-head h2 {
  color: var(--ink-900);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
  body.buyer-conversation-page.public-shell.conversation-page .conversation-card-head {
    background: rgba(19, 27, 46, 0.45);
  }
}

.conversation-page .conversation-card-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-card);
  background: var(--surface-50);
}

.public-shell.conversation-page .conversation-card-head {
  padding: 16px 20px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

.conversation-page .conversation-card-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-800);
}

.public-shell.conversation-page .conversation-card-head h2 {
  color: #f5f5f7;
}

.conversation-page .conversation-card-head p {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--ink-500);
}

.conversation-page .chat-viewport {
  position: relative;
  min-height: 0;
}

.conversation-page .chat-load-older {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.conversation-page .chat-load-older__btn {
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #3f3f46;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.04);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.conversation-page .chat-load-older__btn:hover:not(:disabled) {
  background: #fafafa;
  border-color: #a1a1aa;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
}

.conversation-page .chat-load-older__btn:focus-visible {
  outline: 2px solid #18181b;
  outline-offset: 2px;
}

.conversation-page .chat-load-older__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.conversation-page .chat-list {
  min-height: 200px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 44px 20px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

body.buyer-conversation-page.public-shell .chat-list {
  margin: 0 18px;
  margin-top: 10px;
  border-radius: var(--radius-md);
  background: var(--surface-200);
  border: 1px solid var(--border-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 240px;
  max-height: min(58vh, 560px);
}

body.buyer-conversation-page.public-shell .chat-empty-state {
  color: var(--ink-500);
}

body.buyer-conversation-page.public-shell .chat-bubble--buyer {
  background: var(--surface-100);
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

body.buyer-conversation-page.public-shell .chat-bubble--buyer:hover {
  box-shadow: var(--shadow-md);
}

body.buyer-conversation-page.public-shell .chat-bubble--buyer .chat-sender {
  color: var(--ink-600);
}

body.buyer-conversation-page.public-shell .chat-bubble--buyer .chat-text {
  color: var(--ink-900);
}

body.buyer-conversation-page.public-shell .chat-bubble--buyer .chat-time {
  color: var(--ink-500);
}

body.buyer-conversation-page.public-shell .chat-bubble--seller {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

body.buyer-conversation-page.public-shell .chat-bubble--seller:hover {
  box-shadow: var(--shadow-md);
}

body.buyer-conversation-page.public-shell .chat-bubble--seller .chat-sender {
  color: var(--ink-600);
}

body.buyer-conversation-page.public-shell .chat-bubble--seller .chat-text {
  color: var(--ink-900);
}

body.buyer-conversation-page.public-shell .chat-bubble--seller .chat-time {
  color: var(--ink-500);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--buyer:not(.is-me) {
  background: var(--surface-card);
  border-color: var(--border-card);
  color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--buyer:not(.is-me) .chat-sender {
  color: var(--ink-600);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--buyer:not(.is-me) .chat-text {
  color: var(--ink-900);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--buyer:not(.is-me) .chat-time {
  color: var(--ink-500);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--seller.is-me {
  background: var(--surface-100);
  border-color: var(--border-card);
  color: var(--ink-900);
  box-shadow: var(--shadow-sm);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--seller.is-me .chat-sender {
  color: var(--ink-600);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--seller.is-me .chat-text {
  color: var(--ink-900);
}

body.public-shell.buyer-support-tickets-page.conversation-page .chat-bubble--seller.is-me .chat-time {
  color: var(--ink-500);
}

.conversation-page .chat-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.conversation-page .chat-list.is-empty {
  justify-content: center;
  align-items: center;
  padding-top: 16px;
}

.conversation-page .chat-empty-state {
  margin: 0;
  text-align: center;
  color: var(--ink-500);
  padding: 24px 16px;
  font-size: 0.95rem;
}

.conversation-page .chat-bubble {
  box-sizing: border-box;
  width: fit-content;
  max-width: min(88%, 22rem);
  padding: 9px 14px 8px;
  border-radius: 18px;
  border: 1px solid transparent;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr);
  transition: box-shadow 0.18s ease, transform 0.12s ease;
}

.conversation-page .chat-bubble--buyer {
  background: #18181b;
  border-color: #27272a;
  color: #fafafa;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.conversation-page .chat-bubble--buyer:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.conversation-page .chat-bubble--buyer .chat-sender {
  color: #ffffff;
  font-size: 0.8rem;
}

.conversation-page .chat-bubble--buyer .chat-text {
  color: #f4f4f5;
}

.conversation-page .chat-bubble--buyer .chat-time {
  color: rgba(250, 250, 250, 0.5);
}

.conversation-page .chat-bubble--seller {
  background: #ffffff;
  border-color: #e4e4e7;
  color: #18181b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
}

.conversation-page .chat-bubble--seller:hover {
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.1);
}

.conversation-page .chat-bubble--seller .chat-sender {
  color: #3f3f46;
  font-size: 0.8rem;
}

.conversation-page .chat-bubble--seller .chat-text {
  color: #18181b;
}

.conversation-page .chat-bubble--seller .chat-time {
  color: #a1a1aa;
}

.conversation-page .chat-bubble.is-me {
  margin-right: 0;
  margin-left: auto;
  border-bottom-left-radius: 7px;
}

.conversation-page .chat-bubble:not(.is-me) {
  margin-right: auto;
  margin-left: 0;
  border-bottom-right-radius: 7px;
}

.conversation-page .chat-bubble .chat-sender {
  font-weight: 600;
  line-height: 1.25;
}

.conversation-page .chat-bubble .chat-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.conversation-page .chat-bubble .chat-time {
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.2;
  justify-self: end;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.conversation-page .chat-form {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border-card);
  background: var(--surface-card);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.public-shell.conversation-page .chat-form {
  margin-top: 14px;
  padding: 16px 18px 18px;
  border-top-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

body.buyer-conversation-page.public-shell .chat-form {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 12px;
}

body.buyer-conversation-page.public-shell .chat-form .form-control {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.buyer-conversation-page.public-shell .chat-form .form-control::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.conversation-page .chat-form .form-control {
  box-sizing: border-box;
  min-height: 48px;
  height: 48px;
  max-height: 140px;
  resize: none;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  padding: 12px 14px;
  font: inherit;
  line-height: 1.45;
  overflow-y: auto;
}

.conversation-page .chat-send-btn {
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
  align-self: end;
  position: relative;
  border: 1px solid #18181b;
  background: #18181b;
  color: #fafafa;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.conversation-page .chat-send-btn:hover:not(:disabled):not(.is-loading) {
  background: #27272a;
  border-color: #27272a;
  transform: translateY(-1px);
}

.conversation-page .chat-send-btn:active:not(:disabled):not(.is-loading) {
  transform: translateY(0);
}

.conversation-page .chat-send-btn:disabled {
  opacity: 0.88;
  cursor: default;
}

.conversation-page .chat-send-btn.is-loading {
  cursor: default;
  transform: none;
}

.conversation-page .chat-send-btn__state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.conversation-page .chat-send-btn__state--busy {
  display: none;
}

.conversation-page .chat-send-btn.is-loading {
  pointer-events: none;
}

.conversation-page .chat-send-btn.is-loading .chat-send-btn__state--idle {
  display: none;
}

.conversation-page .chat-send-btn.is-loading .chat-send-btn__state--busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.conversation-page .chat-send-btn__spinner {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(250, 250, 250, 0.22);
  border-top-color: #fafafa;
  border-radius: 50%;
  flex-shrink: 0;
  animation: chat-send-spin 0.55s linear infinite;
}

.conversation-page .chat-send-btn__icon {
  display: block;
  flex-shrink: 0;
}

@keyframes chat-send-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .conversation-page .chat-send-btn__spinner {
    animation: none;
    border-color: rgba(250, 250, 250, 0.35);
    border-top-color: #fafafa;
    opacity: 0.85;
  }
}

.conversation-page #inquiryChatMessage {
  margin: 0 20px 12px;
}

.public-shell.conversation-page #inquiryChatMessage.order-message {
  margin: 10px 18px 0;
  background: rgba(22, 163, 74, 0.12);
  color: #86efac;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.public-shell.conversation-page #inquiryChatMessage.order-message.error {
  background: rgba(220, 38, 38, 0.14);
  color: #fecaca;
  border-color: rgba(220, 38, 38, 0.35);
}

@media (min-width: 1024px) {
  .conversation-page .order-hero-inner,
  .conversation-page .section .container,
  .conversation-page .conversation-card {
    max-width: 960px;
  }
  .conversation-page .chat-list {
    max-height: 520px;
  }
}

@media (min-width: 1280px) {
  .conversation-page .order-hero-inner,
  .conversation-page .section .container,
  .conversation-page .conversation-card {
    max-width: 1080px;
  }
  .conversation-page .chat-list {
    max-height: 560px;
  }
}

@media (max-width: 560px) {
  .public-shell.conversation-page .conversation-card {
    border-radius: 14px;
  }

  body.buyer-conversation-page.public-shell .chat-list {
    margin-inline: 12px;
    max-height: min(55vh, 500px);
  }

  .public-shell.conversation-page #inquiryChatMessage.order-message {
    margin-inline: 12px;
  }

  .conversation-page .chat-form {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding-inline: 14px;
    align-items: end;
  }

  body.buyer-conversation-page.public-shell .chat-form {
    display: flex;
    gap: 10px;
  }

  .conversation-page .chat-form .form-control {
    min-height: 46px;
    height: 46px;
  }

  .conversation-page .chat-send-btn {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 13px;
  }

  .conversation-page .chat-send-btn__spinner {
    width: 20px;
    height: 20px;
  }

  .conversation-page .chat-bubble {
    max-width: min(94%, 20rem);
  }
}
