/* Support page, desktop layout. Below 768px the page keeps its phone layout untouched; the
   wrapper is transparent there and the side column and hints are hidden. */
.msupport-wrap { display: contents; }
.msupport-side, .msupport__hint, .msupport__drop, .msupport__head-meta { display: none; }

@media (min-width: 768px) {
  .msupport-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 20px 24px;
    box-sizing: border-box;
  }
  /* The chat is a full-height panel now, not a narrow column with empty space either side. */
  .msupport {
    max-width: none !important;
    width: 100%;
    margin: 0;
    min-height: 560px;
    /* Fills the screen under the top bar, less the wrapper's padding; the transcript scrolls inside. */
    height: calc(100vh - var(--dshell-topbar, 72px) - 40px);
    border: 1px solid #1A222D !important;
    border-radius: 20px;
    overflow: hidden;
    background:
      radial-gradient(700px 380px at 100% 0%, rgba(24, 187, 89, .08), transparent 60%),
      radial-gradient(520px 320px at 0% 100%, rgba(56, 120, 255, .05), transparent 60%),
      #080C12;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  }
  .msupport__head { padding: 18px 26px; border-bottom: 1px solid #141C26; }
  .msupport__head > div:nth-child(2) { flex: 1; min-width: 0; }
  .msupport__head-meta { display: flex; gap: 8px; align-items: center; }
  .msupport__chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, .04); border: 1px solid #1E2733;
    color: #8A93A2; font-size: 12px; font-weight: 600; white-space: nowrap;
  }
  .msupport__chip .mdi { font-size: 15px; color: #18BB59; }

  /* Transcript: a faint dot grid so the wide area does not read as a void. */
  .msupport__body {
    padding: 4px 32px 16px;
    background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 22px 22px;
  }
  .msupport__body .support-message { max-width: min(68ch, 70%); font-size: 14.5px; padding: 11px 15px; }

  .msupport__footer { margin: 0 26px 6px; padding: 7px 7px 7px 9px; align-items: flex-end; }
  /* One line to start, growing with the text (support-desktop.js) instead of a fixed 80px box
     that left the attach and send keys hanging under it. */
  .msupport__footer #chat_input {
    height: 40px; min-height: 40px; max-height: 168px;
    padding: 10px 6px; line-height: 20px;
    overflow-y: auto;
  }
  .msupport__hint {
    display: block; margin: 0 0 14px; padding: 0 30px;
    color: #4F5866; font-size: 11.5px; text-align: right;
  }

  /* Drag an image anywhere onto the chat to attach it. */
  .msupport { position: relative; }
  .msupport__drop {
    position: absolute; inset: 10px; z-index: 5;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    border: 2px dashed rgba(24, 187, 89, .6); border-radius: 16px;
    background: rgba(7, 11, 17, .86);
    color: #CFEFDC; font-size: 15px; font-weight: 600;
    pointer-events: none;
  }
  .msupport__drop .mdi { font-size: 40px; color: #18BB59; }
  .msupport.is-dragging .msupport__drop { display: flex; }

  /* Signed out: the invitation sits in the middle of the panel rather than in its top corner. */
  .msupport-intro { max-width: 520px; margin: auto; padding: 32px; text-align: center; }
  .msupport-intro__cta { justify-content: center; flex-wrap: wrap; }
  /* The inline rules make these blocks with top padding, which left "Sign In" riding high and
     wrapped "Create an account" onto two lines. Centre the label and keep it on one line. */
  .msupport-intro__btn {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; min-width: 190px; min-height: 50px;
    padding: 0 28px; line-height: 1; white-space: nowrap;
  }
}

/* Wide screens: the side column with topics, the assistant, safety and shortcuts. */
@media (min-width: 1100px) {
  .msupport-wrap { grid-template-columns: minmax(0, 1fr) 330px; }
  .msupport-side {
    display: flex; flex-direction: column; gap: 14px;
    min-height: 0; overflow-y: auto; scrollbar-width: none;
    max-height: calc(100vh - var(--dshell-topbar, 72px) - 40px);
  }
  .msupport-side::-webkit-scrollbar { display: none; }
}
@media (min-width: 1500px) {
  .msupport-wrap { grid-template-columns: minmax(0, 1fr) 360px; padding: 24px 32px; gap: 24px; }
  .msupport { height: calc(100vh - var(--dshell-topbar, 72px) - 48px); }
  .msupport-side { max-height: calc(100vh - var(--dshell-topbar, 72px) - 48px); }
}

.msside-tips { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msside-tips li { display: flex; gap: 10px; align-items: flex-start; color: #A9B1BD; font-size: 13px; line-height: 1.45; }
.msside-tips .mdi { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: rgba(24, 187, 89, .1); color: #18BB59; font-size: 14px; }
.msupport-side, .msupport-side button { font-family: 'Roboto', Helvetica, Arial, sans-serif; }
.msside-card {
  display: block;
  padding: 18px;
  border: 1px solid #1A222D;
  border-radius: 18px;
  background: #0B1017;
  color: #EAECEF;
  text-decoration: none;
}
.msside-card__title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #EAECEF;
}
.msside-card__title .mdi { font-size: 18px; color: #18BB59; }
.msside-card__text { display: block; margin: 0; color: #858C97; font-size: 13px; line-height: 1.5; }

.msside-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.msside-topic {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid #1E2733; background: #0F151D;
  color: #C9CFD8; font: 600 13px/1 'Roboto', Helvetica, Arial, sans-serif;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}
.msside-topic .mdi { font-size: 16px; color: #18BB59; }
.msside-topic:hover { border-color: rgba(24, 187, 89, .45); background: rgba(24, 187, 89, .08); color: #EAECEF; transform: translateY(-1px); }
.msside-topic:focus-visible { outline: 2px solid #18BB59; outline-offset: 2px; }

.msside-card--ai {
  display: flex; gap: 14px; align-items: flex-start;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(24, 187, 89, .16), transparent 70%),
    #0B1017;
  border-color: rgba(24, 187, 89, .22);
  transition: border-color .15s ease, transform .15s ease;
}
.msside-card--ai:hover { border-color: rgba(24, 187, 89, .5); transform: translateY(-1px); }
.msside-ai__mark {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #18BB59, #0E8F41); color: #05130A;
  box-shadow: 0 10px 22px rgba(14, 143, 65, .3);
}
.msside-ai__mark .mdi { font-size: 22px; }
.msside-ai__body { display: flex; flex-direction: column; min-width: 0; }
.msside-ai__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: #18BB59; font-size: 13px; font-weight: 700; }
.msside-ai__cta .mdi { transition: transform .15s ease; }
.msside-card--ai:hover .msside-ai__cta .mdi { transform: translateX(3px); }

.msside-card--safe { border-color: rgba(242, 153, 74, .18); background: linear-gradient(180deg, rgba(242, 153, 74, .05), transparent 70%), #0B1017; }
.msside-card--safe .msside-card__title .mdi { color: #F2B04A; }
.msside-link {
  display: inline-flex; align-items: center; gap: 2px; margin-top: 10px;
  color: #F2B04A; font-size: 13px; font-weight: 700; text-decoration: none;
}
.msside-link:hover { color: #FFC56B; }

.msside-shortcuts { display: flex; flex-direction: column; margin-top: 8px; }
.msside-shortcuts a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; margin: 0 -8px; border-radius: 10px;
  color: #C9CFD8; font-size: 13.5px; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.msside-shortcuts a .mdi { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #121A23; color: #18BB59; font-size: 16px; }
.msside-shortcuts a:hover { background: rgba(255, 255, 255, .04); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .msside-topic, .msside-card--ai, .msside-ai__cta .mdi { transition: none; }
}
