/* A2Z Files support centre — isolated so support UI cannot be lost to a stale theme bundle. */
.support-page,
.support-page * { box-sizing: border-box; }

.support-page {
  min-height: 70vh;
  padding: 58px 0 88px;
  overflow-x: clip;
  background:
    radial-gradient(circle at 92% 8%, rgba(241, 197, 81, .16), transparent 28rem),
    #f7f4ed;
  color: #171a18;
}

.support-page > .container { max-width: 1180px; }

.support-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.support-head > div { min-width: 0; }
.support-head h1 {
  margin: 7px 0 8px;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.05em;
}
.support-head p { max-width: 650px; margin: 0; color: #6f716c; font-size: 13px; line-height: 1.65; }
.support-head .btn { flex: 0 0 auto; min-height: 46px; border-radius: 13px; }

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.support-card,
.conversation-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e3dccf;
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 54px rgba(41, 33, 20, .07);
}
.support-card { padding: 24px; }

.support-card-title {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}
.support-card-title > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border-radius: 14px;
  background: #171a18;
  color: #f3c952;
  font-size: 17px;
}
.support-card-title > div { min-width: 0; }
.support-card-title h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.025em; }
.support-card-title p { margin: 4px 0 0; color: #858177; font-size: 10px; line-height: 1.5; }

.support-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0 0 15px;
  color: #66675f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.support-form-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 12px; }
.support-form :is(input, select, textarea),
.chat-composer textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid #dcd4c5;
  border-radius: 13px;
  background: #fff;
  color: #20231f;
  font: 500 12px/1.5 Manrope, sans-serif;
  outline: 0;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.support-form :is(input, select) { height: 48px; padding: 0 13px; }
.support-form select { appearance: auto; cursor: pointer; }
.support-form textarea { min-height: 150px; padding: 13px; resize: vertical; }
.support-form :is(input, select, textarea)::placeholder,
.chat-composer textarea::placeholder { color: #9b988f; opacity: 1; }
.support-form :is(input, select, textarea):focus,
.chat-composer textarea:focus {
  border-color: #b98d2d;
  box-shadow: 0 0 0 4px rgba(185, 141, 45, .11);
}

.support-form .support-upload {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  min-width: 0;
  padding: 13px;
  border: 1px dashed #d6c69f;
  border-radius: 14px;
  background: #fcf9f1;
  cursor: pointer;
}
.support-upload > i { grid-row: 1; color: #916b1e; font-size: 18px; }
.support-upload > span { grid-row: 1; display: grid; min-width: 0; }
.support-upload b { color: #272a26; font-size: 11px; letter-spacing: 0; text-transform: none; }
.support-upload small { margin-top: 2px; color: #89857b; font-size: 8px; letter-spacing: 0; text-transform: none; }
.support-form .support-upload input[type="file"] {
  grid-column: 1 / -1;
  height: auto;
  padding: 7px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 10px;
}
.support-upload input[type="file"]::file-selector-button,
.composer-attachment input[type="file"]::file-selector-button {
  margin-right: 9px;
  padding: 8px 11px;
  border: 1px solid #d8d0c2;
  border-radius: 9px;
  background: #fff;
  color: #30332f;
  font: 700 9px Manrope, sans-serif;
  cursor: pointer;
}
.support-form > .btn { min-height: 47px; padding-inline: 20px; border-radius: 13px; }

.ticket-list { display: grid; }
.ticket-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px 5px;
  border-top: 1px solid #eee8dd;
  color: inherit;
  text-decoration: none;
  transition: padding .18s ease, background .18s ease;
}
.ticket-row:hover { padding-left: 10px; background: #fdfaf3; color: inherit; }
.ticket-row-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f2ead7;
  color: #85621b;
}
.ticket-row-copy { min-width: 0; }
.ticket-row-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-width: 0; }
.ticket-row-copy b { min-width: 0; overflow: hidden; color: #252824; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row-copy p { margin: 5px 0; overflow: hidden; color: #706c63; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row-copy small { display: block; overflow-wrap: anywhere; color: #9a958b; font-size: 8px; line-height: 1.55; }
.ticket-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 7px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.ticket-status.open { background: #e7f7ee; color: #146d42; }
.ticket-status.in_progress { background: #e8f1ff; color: #285f99; }
.ticket-status.waiting { background: #fff0d2; color: #8d5d0c; }
.ticket-status.closed { background: #ededeb; color: #62645f; }

.support-empty { padding: 58px 18px; text-align: center; }
.support-empty > i { color: #b18d43; font-size: 31px; }
.support-empty h3 { margin: 13px 0 5px; font-size: 16px; font-weight: 800; }
.support-empty p { margin: 0; color: #858177; font-size: 10px; }

/* Conversation view */
.narrow-support { max-width: 980px; }
.support-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 17px; color: #72561b; font-size: 10px; font-weight: 800; text-decoration: none; }
.thread-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.thread-head > div { min-width: 0; }
.thread-head > div > span { color: #987323; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.thread-head h1 { margin: 5px 0; overflow-wrap: anywhere; font-size: clamp(25px, 3vw, 34px); font-weight: 800; letter-spacing: -.04em; }
.thread-head p { margin: 0; color: #807b71; font-size: 9px; }
.conversation-list { max-height: 580px; min-height: 330px; overflow-y: auto; padding: 24px; background: linear-gradient(#faf8f3, #f2eee5); }
.chat-message { display: flex; align-items: flex-end; gap: 9px; min-width: 0; margin-bottom: 17px; }
.chat-message.user-message { flex-direction: row-reverse; }
.chat-avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 11px; background: #171a18; color: #f3c952; }
.user-message .chat-avatar { background: #e8dec7; color: #755718; }
.chat-bubble { width: min(76%, 630px); min-width: 0; padding: 14px 16px; border: 1px solid #e0d8c8; border-radius: 17px 17px 17px 5px; background: #fff; box-shadow: 0 8px 22px rgba(31, 27, 20, .04); }
.user-message .chat-bubble { border-color: #252824; border-radius: 17px 17px 5px 17px; background: #171a18; color: #fff; }
.chat-bubble header { display: flex; justify-content: space-between; gap: 12px; }
.chat-bubble header b { font-size: 9px; }
.chat-bubble time { flex: 0 0 auto; color: #928d83; font-size: 7px; }
.user-message .chat-bubble time { color: #a4a7a4; }
.chat-bubble p { margin: 8px 0 0; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.chat-attachment { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 9px 10px; border-radius: 10px; background: #f3ecdb; color: #725419; font-size: 8px; font-weight: 800; text-decoration: none; }
.chat-attachment i:last-child { margin-left: auto; }
.chat-composer { padding: 18px; border-top: 1px solid #e4ddd0; background: #fff; }
.chat-composer textarea { min-height: 100px; padding: 13px; resize: vertical; }
.chat-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.composer-attachment { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; color: #6f6b62; font-size: 9px; font-weight: 800; cursor: pointer; }
.composer-attachment input { min-width: 0; max-width: 220px; font-size: 8px; }
.chat-composer .btn { min-height: 44px; border-radius: 12px; }
.closed-ticket-note { display: flex; align-items: center; gap: 11px; padding: 19px; background: #fff; }
.closed-ticket-note > i { color: #478561; font-size: 22px; }
.closed-ticket-note > div { display: grid; flex: 1; min-width: 0; }
.closed-ticket-note b { font-size: 11px; }
.closed-ticket-note span { color: #89857c; font-size: 8px; }
.closed-ticket-note a { color: #805f1d; font-size: 9px; font-weight: 800; }

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

@media (max-width: 767px) {
  .support-page { padding: 34px 0 86px; }
  .support-page > .container { width: 100%; padding-inline: 14px; }
  .support-head { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 20px; }
  .support-head h1 { font-size: 33px; }
  .support-head p { font-size: 11px; }
  .support-head .btn { width: 100%; }
  .support-layout { gap: 14px; }
  .support-card { padding: 17px; border-radius: 19px; }
  .support-card-title { align-items: flex-start; }
  .support-form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .support-form > .btn { width: 100%; }
  .ticket-row { grid-template-columns: 39px minmax(0, 1fr) 14px; gap: 10px; padding-block: 14px; }
  .ticket-row-icon { width: 39px; height: 39px; }
  .ticket-row-copy > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .ticket-row-copy p { max-width: 100%; }
  .thread-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .thread-head h1 { font-size: 25px; }
  .conversation-list { min-height: 300px; max-height: 54vh; padding: 15px 10px; }
  .chat-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .chat-bubble { width: min(86%, 520px); padding: 11px; }
  .chat-bubble header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .chat-composer { padding: 12px; }
  .chat-composer > div { align-items: stretch; flex-direction: column; }
  .composer-attachment { flex-wrap: wrap; }
  .composer-attachment input { width: 100%; max-width: 100%; }
  .chat-composer .btn { width: 100%; }
  .closed-ticket-note { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 359px) {
  .support-page > .container { padding-inline: 10px; }
  .support-card { padding: 14px; }
  .support-card-title > span { width: 40px; height: 40px; flex-basis: 40px; }
  .ticket-row { grid-template-columns: 36px minmax(0, 1fr); }
  .ticket-row > .bi-chevron-right { display: none; }
  .chat-avatar { display: none; }
  .chat-bubble { width: 92%; }
}
