/* Customer issues and feedback portal */
.support-page {
  width: 100%;
  padding: 2rem 0 3.5rem;
}

.support-page button,
.support-page input,
.support-page select,
.support-page textarea {
  font: inherit;
}

.support-head,
.support-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.support-head--compact { align-items: flex-start; }

.support-head h1,
.support-detail-head h1 {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.2;
}

.support-head > div > p:last-child,
.support-detail-head > div > p:last-child {
  max-width: 700px;
  margin-top: .45rem;
  color: var(--text-muted);
  font-size: .94rem;
}

.support-eyebrow {
  margin-bottom: .35rem;
  color: #ff85d8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.support-head .btn svg,
.support-detail-head .btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.support-close-button {
  flex: 0 0 auto;
  border-color: rgba(255, 112, 140, .26);
  color: #ff9aad;
}

.support-close-button:hover,
.support-close-button:focus-visible {
  border-color: rgba(255, 112, 140, .48);
  background: rgba(151, 30, 55, .16);
  color: #ffc0cb;
}

.support-close-button:disabled { opacity: .58; cursor: wait; transform: none; }

.support-panel {
  overflow: hidden;
  border: 1px solid rgba(200, 130, 255, .16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .015)),
    rgba(20, 8, 34, .88);
  box-shadow: 0 20px 55px rgba(4, 0, 12, .3);
}

.support-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid rgba(200, 130, 255, .1);
}

.support-panel__head h2 {
  color: #fff;
  font-size: 1rem;
}

.support-panel__head > span {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(200, 130, 255, .18);
  border-radius: 99px;
  background: rgba(136, 102, 255, .1);
  color: #d8c8ff;
  font-size: .75rem;
  font-weight: 700;
}

.support-list { display: grid; }
.support-list__more { display:flex; justify-content:center; padding:1rem; border-top:1px solid rgba(200, 130, 255, .08); }

.support-ticket {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid rgba(200, 130, 255, .08);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}

.support-ticket:last-child { border-bottom: 0; }
.support-ticket:hover,
.support-ticket:focus-visible { background: rgba(255, 255, 255, .04); }
.support-ticket:focus-visible { outline: 2px solid rgba(255, 85, 204, .55); outline-offset: -2px; }

.support-ticket__accent {
  width: 4px;
  height: 46px;
  flex: 0 0 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ff55cc, #8866ff);
  box-shadow: 0 0 16px rgba(255, 85, 204, .38);
}

.support-ticket__body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: .38rem;
}

.support-ticket__topline {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.support-ticket__kind {
  color: #ff9cdf;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.support-ticket__body > strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-ticket__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  color: var(--text-muted);
  font-size: .76rem;
}

.support-ticket__chevron,
.support-back svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-ticket__chevron { color: rgba(216, 200, 255, .4); }

.support-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .2rem .58rem;
  border: 1px solid rgba(121, 234, 255, .22);
  border-radius: 99px;
  background: rgba(23, 84, 92, .22);
  color: #9cefff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.support-status--in_progress,
.support-status--pending {
  border-color: rgba(255, 205, 105, .24);
  background: rgba(100, 67, 10, .2);
  color: #ffd984;
}

.support-status--awaiting_staff {
  border-color: rgba(255, 205, 105, .24);
  background: rgba(100, 67, 10, .2);
  color: #ffd984;
}

.support-status--awaiting_user,
.support-status--waiting_user,
.support-status--awaiting_customer {
  border-color: rgba(255, 133, 216, .25);
  background: rgba(102, 25, 78, .2);
  color: #fface4;
}

.support-status--resolved {
  border-color: rgba(133, 240, 169, .24);
  background: rgba(23, 91, 52, .22);
  color: #a5f2be;
}

.support-status--closed {
  border-color: rgba(190, 175, 205, .18);
  background: rgba(80, 67, 90, .2);
  color: #c7b8d1;
}

.support-empty {
  display: grid;
  justify-items: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.support-empty__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid rgba(255, 85, 204, .24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 85, 204, .15), rgba(136, 102, 255, .11));
  color: #ff91dc;
}

.support-empty__icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-empty h2 { color: #fff; font-size: 1.1rem; }
.support-empty p { max-width: 460px; margin-top: .35rem; color: var(--text-muted); font-size: .88rem; }

.support-loading {
  display: flex;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.support-alert { margin-bottom: 1rem; }

.support-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 0 1rem;
  padding: .3rem .15rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.support-back:hover { color: #fff; }

.support-form { padding: 1.4rem; }
.support-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.support-field {
  display: grid;
  gap: .45rem;
  margin-bottom: 1rem;
  color: #eee1f9;
  font-size: .82rem;
  font-weight: 700;
}

.support-field > span small {
  color: var(--text-dim);
  font-size: .72rem;
  font-weight: 500;
}

.support-field input,
.support-field textarea,
.support-reply textarea {
  width: 100%;
  border: 1px solid rgba(200, 130, 255, .19);
  border-radius: 12px;
  outline: none;
  background: rgba(8, 3, 15, .56);
  color: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.support-field input,
.support-field input { min-height: 44px; padding: .65rem .8rem; }
.support-field textarea,
.support-reply textarea { display: block; padding: .8rem .9rem; line-height: 1.55; resize: vertical; }

.support-field input:focus,
.support-field textarea:focus,
.support-reply textarea:focus {
  border-color: rgba(255, 85, 204, .55);
  box-shadow: 0 0 0 3px rgba(255, 85, 204, .1);
}

.support-field input::placeholder,
.support-field textarea::placeholder,
.support-reply textarea::placeholder { color: rgba(200, 168, 232, .43); }

.support-upload { margin-bottom: 1rem; }
.support-upload__input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.support-upload__button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .48rem .75rem;
  border: 1px dashed rgba(200, 130, 255, .3);
  border-radius: 10px;
  background: rgba(136, 102, 255, .08);
  color: #d8c8ff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.support-upload__button:hover { border-color: rgba(255, 85, 204, .55); background: rgba(255, 85, 204, .1); }
.support-upload__button svg,
.support-attachment svg,
.support-safety svg,
.support-closed svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-upload__hint { margin-top: .45rem; color: var(--text-dim); font-size: .72rem; }
.support-upload__files { display: grid; gap: .35rem; margin-top: .55rem; }

.support-upload__files li {
  display: flex;
  max-width: 520px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .42rem .65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-muted);
  font-size: .75rem;
}

.support-upload__files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-upload__files li small { flex-shrink: 0; color: var(--text-dim); }

.support-safety {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: .2rem 0 1.25rem;
  padding: .75rem .85rem;
  border: 1px solid rgba(255, 205, 105, .15);
  border-radius: 12px;
  background: rgba(92, 59, 9, .12);
  color: #d5c39a;
  font-size: .75rem;
  line-height: 1.5;
}

.support-safety svg { margin-top: .1rem; color: #ffd984; }
.support-safety--compact { margin-top: .8rem; }
.support-form__actions { display: flex; justify-content: flex-end; gap: .65rem; }
.support-form__actions .btn:disabled { opacity: .55; cursor: wait; transform: none; }

.support-detail-head { align-items: flex-start; }
.support-detail-head__meta { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; color: var(--text-muted); font-size: .75rem; }
.support-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 1.1rem; }

.support-timeline { padding: 1.2rem; }
.support-message { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .75rem; padding-bottom: 1.35rem; }
.support-message:last-child { padding-bottom: 0; }
.support-message:not(:last-child)::before { content: ''; position: absolute; top: 38px; bottom: 0; left: 17px; width: 1px; background: rgba(200, 130, 255, .14); }

.support-message__avatar {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(200, 130, 255, .2);
  border-radius: 12px;
  background: #1b0a2d;
  color: #d9c8ff;
  font-size: .77rem;
  font-weight: 900;
}

.support-message--team .support-message__avatar { border-color: rgba(255, 85, 204, .3); background: linear-gradient(145deg, rgba(255, 85, 204, .25), rgba(136, 102, 255, .22)); color: #fff; }
.support-message__avatar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.support-message__content {
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid rgba(200, 130, 255, .11);
  border-radius: 0 15px 15px 15px;
  background: rgba(8, 3, 15, .42);
}

.support-message--team .support-message__content { border-color: rgba(255, 85, 204, .16); background: linear-gradient(145deg, rgba(255, 85, 204, .065), rgba(136, 102, 255, .055)); }
.support-message__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; }
.support-message__head strong { color: #fff; font-size: .82rem; }
.support-message__head time { color: var(--text-dim); font-size: .68rem; }
.support-message__body { overflow-wrap: anywhere; color: #decbea; font-size: .87rem; line-height: 1.65; }

.support-attachments { display: grid; gap: .45rem; margin-top: .8rem; }
.support-attachment {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .55rem;
  padding: .55rem .65rem;
  border: 1px solid rgba(200, 130, 255, .13);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  color: #d8c8ff;
  text-align: left;
  cursor: pointer;
}

.support-attachment:hover { border-color: rgba(255, 85, 204, .35); background: rgba(255, 85, 204, .06); }
.support-attachment > span { display: grid; min-width: 0; flex: 1; }
.support-attachment strong { overflow: hidden; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.support-attachment small { color: var(--text-dim); font-size: .64rem; }
.support-attachment .support-attachment__download { width: 15px; height: 15px; flex: 0 0 15px; }

.support-reply { padding: 1.15rem; border-top: 1px solid rgba(200, 130, 255, .1); }
.support-reply > label { display: block; margin-bottom: .45rem; color: #fff; font-size: .82rem; font-weight: 700; }
.support-reply textarea { margin-bottom: .8rem; }
.support-closed { display: flex; align-items: flex-start; gap: .75rem; margin: 0 1.15rem 1.15rem; padding: 1rem; border: 1px solid rgba(133, 240, 169, .18); border-radius: 13px; background: rgba(23, 91, 52, .13); color: #a5f2be; }
.support-closed strong { display: block; color: #d6ffe1; font-size: .85rem; }
.support-closed p { margin-top: .15rem; color: #9bc8a8; font-size: .76rem; }
.support-closed:focus { outline: 2px solid rgba(133, 240, 169, .42); outline-offset: 3px; }
.support-no-messages { padding: 1.25rem; color: var(--text-muted); font-size: .85rem; }

body.support-close-modal-open { overflow: hidden; }

.support-close-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  padding: 1rem;
  place-items: center;
}

.support-close-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(3, 0, 9, .72);
  backdrop-filter: blur(8px);
  cursor: default;
}

.support-close-modal__dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 2rem);
  padding: 1.6rem;
  overflow-y: auto;
  border: 1px solid rgba(255, 112, 140, .22);
  border-radius: 22px;
  outline: 0;
  background: linear-gradient(155deg, rgba(41, 13, 45, .99), rgba(17, 6, 28, .99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .58);
}

.support-close-modal__icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid rgba(255, 112, 140, .25);
  border-radius: 14px;
  background: rgba(151, 30, 55, .16);
  color: #ff9aad;
}

.support-close-modal__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-close-modal__dialog h2 { margin: 0; color: #fff; font-size: 1.18rem; }
.support-close-modal__body { margin-top: .7rem; color: var(--text-muted); font-size: .86rem; line-height: 1.6; }
.support-close-modal__body p { margin: 0; }
.support-close-modal__body p + p { margin-top: .65rem; }
.support-close-modal__warning { color: #ffbdc8; }
.support-close-modal__actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.35rem; }
.support-close-modal__confirm { border: 1px solid rgba(255, 112, 140, .38); background: #b83c59; color: #fff; }
.support-close-modal__confirm:hover,
.support-close-modal__confirm:focus-visible { border-color: rgba(255, 184, 197, .65); background: #ca4766; }

.support-details { position: sticky; top: 5rem; }
.support-details dl { padding: .55rem 1.15rem 1rem; }
.support-details dl > div { padding: .65rem 0; border-bottom: 1px solid rgba(200, 130, 255, .08); }
.support-details dl > div:last-child { border-bottom: 0; }
.support-details dt { color: var(--text-dim); font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.support-details dd { margin-top: .2rem; overflow-wrap: anywhere; color: #e4d5ed; font-size: .78rem; }

@media (max-width: 960px) {
  .support-detail-grid { grid-template-columns: 1fr; }
  .support-details { position: static; order: -1; }
  .support-details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
}

@media (max-width: 680px) {
  .support-page { padding-top: 1.25rem; }
  .support-head { align-items: flex-start; flex-direction: column; }
  .support-head .btn { width: 100%; justify-content: center; }
  .support-detail-head { align-items: stretch; flex-direction: column; }
  .support-close-button { width: 100%; justify-content: center; }
  .support-form { padding: 1rem; }
  .support-form__grid { grid-template-columns: 1fr; gap: 0; }
  .support-ticket { padding: 1rem .85rem; gap: .7rem; }
  .support-ticket__accent { height: 40px; }
  .support-ticket__meta { gap: .2rem .65rem; }
  .support-message { grid-template-columns: 30px minmax(0, 1fr); gap: .55rem; }
  .support-message__avatar { width: 30px; height: 30px; border-radius: 10px; }
  .support-message:not(:last-child)::before { top: 32px; left: 14px; }
  .support-message__content { padding: .8rem; }
  .support-message__head { align-items: flex-start; flex-direction: column; gap: .1rem; }
  .support-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .support-ticket__chevron { display: none; }
  .support-panel { border-radius: 17px; }
  .support-details dl { grid-template-columns: 1fr; }
  .support-form__actions { flex-direction: column-reverse; }
  .support-form__actions .btn { width: 100%; justify-content: center; }
  .support-close-modal__actions { flex-direction: column; }
  .support-close-modal__actions .btn { width: 100%; justify-content: center; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .support-ticket,
  .support-upload__button,
  .support-field input,
  .support-field .noah-select,
  .support-field textarea { transition: none; }
}
