/* Boss support chat — stable 3-column desktop layout */

html.support-page,
body.support-page {
  height: 100%;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  background: #08070a;
  color: #fff;
}

body.support-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.support-page.support-chat-live #floatingCustomerService,
body.support-page.support-chat-live .floating-service,
body.support-page.support-chat-live .service-float,
body.support-page.support-chat-live #mcjButler,
body.support-page.support-chat-live [data-mcj-meow-butler] {
  display: none !important;
}

body.support-page > .topbar {
  flex: 0 0 auto;
  position: relative;
  z-index: 40;
}

.support-msg.failed {
  border: 1px solid rgba(255, 107, 122, 0.55);
  background: rgba(255, 107, 122, 0.12);
}

.support-msg.failed .support-inline-link {
  display: inline;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #ffd6e7;
  text-decoration: underline;
  cursor: pointer;
}

.support-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 10px 12px 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: hidden;
}

.support-layout {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(28, 18, 26, 0.96), rgba(10, 9, 14, 0.98));
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.support-aside,
.support-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.support-rail {
  display: none !important;
}

.support-aside {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.support-rail {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.support-aside-head,
.support-main-head,
.support-rail-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 9, 14, 0.98);
}

.support-aside-head h1,
.support-main-head h2,
.support-rail-head h2 {
  margin: 0;
  font-size: 17px;
}

.support-aside-head p,
.support-main-head p,
.support-rail-head p {
  margin: 4px 0 0;
  color: #9ca3af;
  font-size: 12px;
}

.support-session-list,
.support-rail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 12px;
}

.support-session-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 8px;
}

.support-list-block {
  display: grid;
  gap: 0;
}

.support-list-actions {
  display: grid;
  padding: 0 12px 8px;
}

.support-list-caption {
  color: #ffd6e7;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px 6px;
}

.support-session {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  min-height: 76px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  background: transparent;
  color: #f7f0f4;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.support-session:hover {
  background: rgba(255, 255, 255, 0.04);
}

.support-session.active {
  border-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 120, 180, 0.22);
  box-shadow: inset 4px 0 0 #ff8fc5;
}

.support-session.active .support-session-name {
  color: #ffe6f2;
}

.support-session strong,
.support-session span,
.support-session p {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.support-session-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.support-session-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff7fb;
}

.support-session-sub {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: #ffd6e7;
  font-weight: 600;
}

.support-session-preview {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.5);
}

.support-session-aside {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 52px;
  padding-top: 1px;
}

.support-session-aside small {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

.support-session .support-unread {
  position: static;
  right: auto;
  bottom: auto;
  background: #ef4444;
  border-color: #ef4444;
  color: #fff !important;
}

.support-general,
.support-session-order,
.support-session-general {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Legacy order-card wall styles — keep inert / dark if any leftover DOM */
.support-order-card {
  display: none !important;
}

.support-order-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 4px;
}

.support-order-top,
.support-order-last {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.support-order-top strong,
.support-order-last span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-order-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
}

.support-order-grid b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.support-status-pill,
.support-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 143, 197, 0.14);
  border: 1px solid rgba(255, 143, 197, 0.32);
  color: #ffd6e7 !important;
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1;
}

.support-session .support-unread {
  position: static;
  right: auto;
  bottom: auto;
  background: #ef4444;
  border-color: #ef4444;
  color: #fff !important;
}

.support-session small {
  margin-right: 0;
}

.support-main-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.support-main-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.support-order-no,
.support-chat-status,
.support-order-status-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-back-btn,
.support-btn,
.support-inline-link {
  border: 1px solid rgba(255, 143, 197, 0.4);
  border-radius: 12px;
  background: rgba(255, 143, 197, 0.14);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.support-back-btn,
.support-btn {
  min-height: 40px;
  padding: 8px 12px;
}

.support-btn.primary {
  background: linear-gradient(180deg, #ffe2ef, #e7a0c4);
  color: #1b0712;
  border: 0;
  font-weight: 900;
}

.support-order-summary {
  flex: 0 0 auto;
  margin: 8px 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.support-order-summary-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.support-order-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
  color: #ffd6e7;
  font-size: 12px;
  font-weight: 700;
}

.support-order-summary-meta span {
  color: #9ca3af;
  font-weight: 600;
}

.support-order-summary-body {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 12px 12px;
  font-size: 13px;
}

.support-order-summary.is-open .support-order-summary-body {
  display: grid;
}

.support-order-summary-body div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.support-order-summary-body span {
  color: #9ca3af;
}

.support-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px !important;
  row-gap: 14px !important;
}

.support-msg {
  position: relative;
  display: block;
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: 78%;
  margin: 0 !important;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  overflow-wrap: anywhere;
  clear: both;
}

.support-msg.mine {
  align-self: flex-end;
  background: rgba(255, 143, 197, 0.16);
  border: 1px solid rgba(255, 143, 197, 0.28);
}

.support-msg.system {
  align-self: center;
  max-width: 92%;
  background: transparent;
  color: #9ca3af;
  text-align: center;
  font-size: 12px;
  padding: 4px 8px;
}

.support-msg p,
.support-msg strong,
.support-msg small {
  margin: 0 0 6px;
  display: block;
  line-height: 1.45;
}

.support-msg p:last-child,
.support-msg strong:last-child,
.support-msg small:last-child {
  margin-bottom: 0;
}

.support-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px !important;
}

.support-composer {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px !important;
  align-items: flex-end;
  min-height: 72px;
  padding: 12px 16px;
  box-sizing: border-box;
}

.support-composer-tools {
  display: flex !important;
  gap: 8px !important;
  align-items: center;
  padding-bottom: 2px;
  flex: 0 0 auto;
}

.support-composer textarea,
.support-composer [name="content"] {
  flex: 1 1 120px !important;
  min-width: 0;
  min-height: 44px;
  margin: 0 !important;
}

.support-composer button[type="submit"],
.support-composer .support-send {
  flex: 0 0 auto;
  margin-left: 0 !important;
}

.support-msg small {
  margin-top: 6px;
  color: #9ca3af;
  font-size: 11px;
}

.support-footer {
  flex: 0 0 auto;
  min-height: 68px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 7, 10, 0.98);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  position: relative;
  bottom: auto;
  z-index: 5;
}

.support-emoji-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px 0;
}

.support-emoji-panel button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 18px;
}

.support-composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  min-height: 68px;
  padding: 12px 16px;
  box-sizing: border-box;
}

.support-composer-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 2px;
}

.support-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 143, 197, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #ffd6e7;
  font-size: 18px;
  cursor: pointer;
}

.support-tool-btn[hidden] {
  display: none !important;
}

.support-composer textarea {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  border-radius: 14px;
  border: 1px solid rgba(255, 145, 195, 0.28);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.45;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}

.support-composer textarea:focus {
  outline: none;
  border-color: rgba(255, 145, 195, 0.55);
}

.support-composer .support-send-btn,
button.support-send-btn[type="submit"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  flex: 0 0 auto;
  width: 80px;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #ffe2ef, #e7a0c4) !important;
  color: #1b0712 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(225, 120, 180, 0.28) !important;
}

.support-composer .support-send-btn:disabled,
button.support-send-btn[type="submit"]:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

.support-ended-panel {
  min-height: 68px;
  padding: 12px 16px;
  text-align: center;
  display: grid;
  gap: 8px;
  align-content: center;
  box-sizing: border-box;
}

.support-ended-panel p {
  margin: 0;
  color: #ffd6e7;
  font-weight: 800;
}

.support-ended-panel .support-ended-hint {
  color: #9ca3af;
  font-weight: 600;
  font-size: 12px;
}

.support-ended-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.support-rail-empty {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 16px;
  text-align: center;
  color: #9ca3af;
}

.support-empty-panel,
.support-login-panel,
.support-list-empty {
  padding: 28px 16px;
  text-align: center;
  color: #9ca3af;
}

.support-empty-panel {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 8px;
}

.support-empty-panel strong,
.support-login-panel strong,
.support-list-empty strong {
  color: #fff;
}

.support-rail-body .support-rail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.support-rail-body .support-rail-row span {
  color: #9ca3af;
}

.support-rail-body .support-rail-row strong {
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

.support-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  margin-top: 12px;
  width: 100%;
  box-sizing: border-box;
}

.support-product-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
}

.support-product-card img,
.support-product-cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
}

.support-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.94);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
  text-align: center;
}

.support-toast.show {
  opacity: 1;
}

@media (max-width: 1440px) {
  .support-layout {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  }
}

@media (max-width: 1366px) {
  .support-layout {
    grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  }

  .support-shell {
    padding: 8px 8px 10px;
  }
}

@media (max-width: 1100px) {
  .support-layout {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .support-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .support-rail {
    display: none;
  }
}

@media (max-width: 820px) {
  html.support-page,
  body.support-page {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .support-shell {
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .support-layout {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    width: 100%;
    max-width: 100%;
  }

  .support-aside,
  .support-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .support-layout.mobile-detail .support-aside {
    display: none;
  }

  .support-layout:not(.mobile-detail) .support-main {
    display: none;
  }

  .support-rail {
    display: none;
  }

  .support-main-head .support-btn[data-refresh] {
    display: none;
  }

  .support-ended-actions {
    grid-template-columns: 1fr;
  }

  .support-composer {
    flex-wrap: nowrap;
    gap: 8px !important;
    padding: 10px 12px;
  }

  .support-composer textarea {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    /* iOS Safari zooms into any focused field under 16px. */
    font-size: 16px;
  }

  .support-composer .support-send-btn,
  button.support-send-btn[type="submit"] {
    width: 72px;
  }

  .support-footer {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--support-keyboard-inset, 0px));
  }
}

.support-unread-total{margin-left:8px;vertical-align:middle}
