:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #07111f;
  color: #edf5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 190, 230, 0.13), transparent 36%),
    #07111f;
}

.support-page {
  width: min(100% - 32px, 850px);
  margin: 0 auto;
  padding: 32px 0 60px;
}

.support-header {
  margin-bottom: 24px;
}

.back-link {
  display: inline-block;
  margin-bottom: 22px;
  color: #20d9f3;
  font-size: 14px;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.support-header h1 {
  margin: 0 0 10px;
  color: #f7c84b;
  font-size: clamp(28px, 5vw, 38px);
}

.support-header p,
.support-card > p,
.order-help p {
  color: #aabbd0;
  line-height: 1.6;
}

.support-card,
.order-help {
  margin-bottom: 22px;
  padding: 26px;
  border: 1px solid #24415c;
  border-radius: 18px;
  background: #101f31;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.support-card h2,
.order-help h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.order-help a {
  display: inline-block;
  margin-top: 8px;
  color: #20d9f3;
  font-weight: 700;
  text-decoration: none;
}

.order-help a:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

.support-page label { display: block; margin: 12px 0 6px; }
.support-page textarea, .support-page input, .support-page button { box-sizing: border-box; max-width: 100%; padding: 10px; border: 1px solid #24415c; border-radius: 8px; background: #07111f; color: #edf5ff; }
.support-page textarea { width: 100%; }
.support-page button { cursor: pointer; color: #20d9f3; margin-top: 12px; }
#supportMessages { max-height: 55vh; overflow-y: auto; }
.support-message { padding: 12px; margin: 10px 0; border: 1px solid #24415c; border-radius: 8px; }
.support-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message a { color: #20d9f3; }
#supportInbox { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

@media (max-width: 600px) {
  .support-page {
    width: min(100% - 24px, 850px);
    padding-top: 20px;
  }

  .support-card,
  .order-help {
    padding: 18px;
  }

}

/* Customer conversation only: shared support and Admin pages retain their styles. */
.customer-support-chat.support-card { padding: 0; overflow: hidden; border-radius: 14px; }
.customer-support-chat .customer-chat-header { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px 18px; border-bottom: 1px solid #24415c; }
.customer-support-chat .customer-chat-header h2 { margin: 0; font-size: 17px; align-self: center; }
.customer-support-chat #startSupport { margin: 0; }
.customer-support-chat #supportStatus { grid-column: 1 / -1; margin: 0; color: #aabbd0; font-size: 12px; line-height: 1.5; }
.customer-support-chat #supportStatus:empty { display: none; }
.customer-support-chat #supportMessages { display: flex; flex-direction: column; gap: 10px; height: min(52vh, 500px); min-height: 240px; max-height: none; padding: 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #0b1727; }
.customer-support-chat .support-message { flex: 0 0 auto; max-width: min(84%, 34rem); min-width: 0; margin: 0; padding: 9px 12px; border: 1px solid #294058; border-radius: 13px; background: #16263a; }
.customer-support-chat .support-message--support { align-self: flex-start; border-bottom-left-radius: 4px; }
.customer-support-chat .support-message--customer { align-self: flex-end; border-color: #31586b; background: #163342; border-bottom-right-radius: 4px; }
.customer-support-chat .support-message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; }
.customer-support-chat .support-message-meta strong { color: #bacddd; font-size: 11px; font-weight: 600; }
.customer-support-chat .support-message-meta time { color: #91a6bc; font-size: 10px; }
.customer-support-chat .support-message p { margin: 5px 0 0; color: #edf5ff; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-support-chat .support-message p:empty { display: none; }
.customer-support-chat .support-message a { display: block; margin-top: 7px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; color: #8dd4df; text-underline-offset: 3px; }
.customer-support-chat .customer-chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 14px 18px; border-top: 1px solid #24415c; background: #101f31; }
.customer-support-chat .customer-chat-input { min-width: 0; }
.customer-support-chat #supportText { display: block; margin: 0; min-height: 60px; max-height: 160px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.4; }
.customer-support-chat #sendSupport { margin: 0; min-height: 42px; min-width: 78px; background: #163b4c; border-color: #31586b; font-weight: 600; }
.customer-support-chat .customer-chat-attachment { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; min-width: 0; }
.customer-support-chat #supportAttachment { flex: 1 1 240px; min-width: 0; padding: 0; border: 0; background: transparent; font-size: 12px; color: #aabbd0; }
.customer-support-chat #supportAttachment::file-selector-button { padding: 6px 10px; margin-right: 9px; border: 1px solid #31516a; border-radius: 6px; background: #16263a; color: #c9d9e9; cursor: pointer; }
.customer-support-chat #supportFileGuide { color: #91a6bc; font-size: 11px; }
.customer-support-chat .chat-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.customer-support-chat button, .customer-support-chat textarea { transition: background-color .15s, border-color .15s; }
.customer-support-chat button:hover:not(:disabled) { background: #214d60; }
.customer-support-chat button:disabled { opacity: .65; cursor: wait; }
.customer-support-chat button:focus-visible, .customer-support-chat textarea:focus-visible, .customer-support-chat input:focus-visible, .customer-support-chat a:focus-visible { outline: 2px solid #7bc6d5; outline-offset: 3px; }
@media (max-width: 600px) {
  .customer-support-chat .customer-chat-header { padding: 13px; }
  .customer-support-chat #supportMessages { padding: 13px; height: min(50vh, 440px); }
  .customer-support-chat .support-message { max-width: 92%; }
  .customer-support-chat .customer-chat-composer { padding: 12px; }
  .customer-support-chat .customer-chat-input { grid-column: 1 / -1; }
  .customer-support-chat .customer-chat-attachment { grid-column: 1; grid-row: 2; }
  .customer-support-chat #sendSupport { grid-column: 2; grid-row: 2; align-self: start; }
  .customer-support-chat #supportAttachment { width: 100%; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .customer-support-chat button, .customer-support-chat textarea { transition: none; }
}

/* Customer Email Access Help and FAQ; accepted chat/Admin styles remain unchanged. */
.email-access-help .email-help-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.email-access-help .email-help-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid #315773;
  border-radius: 12px;
  background: #0a1929;
  color: #edf5ff;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.email-access-help .email-help-action strong { color: #20d9f3; line-height: 1.4; }
.email-access-help .email-help-action span { color: #aabbd0; font-size: 13px; line-height: 1.5; }
.email-access-help .email-help-action:hover { border-color: #20d9f3; background: #102638; }
.email-access-help .email-help-action:focus-visible,
.support-faq > summary:focus-visible { outline: 2px solid #20d9f3; outline-offset: 4px; }
.support-faq {
  padding: 0 24px;
  border: 1px solid #24415c;
  border-radius: 16px;
  background: #101f31;
}
.support-faq > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 700;
  color: #edf5ff;
  list-style: none;
}
.support-faq > summary::-webkit-details-marker { display: none; }
.support-faq > summary::after { content: "+"; color: #20d9f3; font-size: 22px; }
.support-faq[open] > summary::after { content: "\2212"; }
.support-faq > .support-card,
.support-faq > .order-help {
  padding: 20px 0;
  margin: 0;
  border: 0;
  border-top: 1px solid #24415c;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.support-faq h2 { font-size: 17px; }
.support-faq p { margin-bottom: 0; }

.email-recovery-page .recovery-boundary,
.email-recovery-page .recovery-help { color: #aabbd0; font-size: 13px; line-height: 1.6; }
.email-recovery-page .recovery-boundary { margin: 0 0 22px; }
.email-recovery-page .recovery-section { margin-bottom: 14px; padding: 22px; }
.email-recovery-page .recovery-form h2 { font-size: 19px; line-height: 1.4; }
.email-recovery-page .recovery-form h3 { font-size: 16px; margin: 0 0 12px; }
.email-recovery-page .recovery-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.email-recovery-page .recovery-field { min-width: 0; }
.email-recovery-page .recovery-form label { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.email-recovery-page .recovery-form input,
.email-recovery-page .recovery-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 12px;
  line-height: 1.5;
  font: inherit;
}
.email-recovery-page .recovery-form textarea { min-height: 130px; resize: vertical; }
.email-recovery-page .recovery-form input:focus,
.email-recovery-page .recovery-form textarea:focus { outline: 2px solid #20d9f3; outline-offset: 2px; }
.email-recovery-page .recovery-help { margin: 10px 0 0; }
.email-recovery-page .recovery-evidence { margin-top: 20px; padding-top: 20px; border-top: 1px solid #24415c; }
.email-recovery-page .recovery-primary {
  padding: 13px 22px;
  background: #20d9f3;
  border-color: #20d9f3;
  color: #07111f;
  font-weight: 700;
}
.email-recovery-page .recovery-primary:hover { background: #60e7f7; }
.email-recovery-page button:focus-visible { outline: 2px solid #20d9f3; outline-offset: 3px; }
.email-recovery-page .recovery-submit { display: flex; justify-content: flex-end; margin-bottom: 22px; }
.email-recovery-page .recovery-submit button { margin-top: 0; }
.email-recovery-page .recovery-status { display: inline-block; padding: 8px 12px; border: 1px solid #315773; border-radius: 8px; color: #f7c84b; }
.email-recovery-page .recovery-progress #recoveryVerify { margin-top: 18px; padding-top: 18px; border-top: 1px solid #24415c; }
.email-recovery-page .recovery-progress #recoveryVerify > label { margin-top: 16px; }
.email-recovery-page .recovery-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 600px) {
  .email-access-help .email-help-actions,
  .email-recovery-page .recovery-fields { grid-template-columns: 1fr; }
  .email-recovery-page .recovery-section { padding: 18px; }
  .email-recovery-page .recovery-submit { display: block; }
  .email-recovery-page .recovery-submit button { width: 100%; }
  .support-faq { padding: 0 18px; }
}
