/* ---- Support hero ---- */
.support-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 28px 24px;
  background: linear-gradient(135deg, rgba(25, 62, 0, 0.03), transparent 60%);
}
.support-hero h1.display {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 18px 0 16px;
}
.support-hero h1.display em {
  font-style: italic;
  color: #3a5a2a;
}
.support-hero .lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 640px;
}

/* ---- Main Layout Block ---- */
.support-block {
  max-width: 920px;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- Tab Bar ---- */
.support-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid rgba(25, 62, 0, 0.15);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 24px;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -2px;
  border-radius: 8px 8px 0 0;
}
.tab-btn:hover {
  color: var(--ink);
  background: rgba(25, 62, 0, 0.03);
}
.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* ---- Panels ---- */
.support-panel {
  background: #fff;
  border: 1px solid rgba(25, 62, 0, 0.12);
  border-radius: 16px;
  padding: 36px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.support-panel:hover {
  box-shadow: 0 22px 36px -24px rgba(25, 62, 0, 0.25);
}
.support-panel h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}
.support-panel .sub {
  color: var(--ink-2);
  font-size: 15px;
  margin-bottom: 24px;
}

/* ---- Form Fields ---- */
.form-group {
  margin-bottom: 20px;
}
.label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 8px;
}
.field {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(25, 62, 0, 0.22);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(25, 62, 0, 0.12);
}
.field::placeholder {
  color: #9a958a;
}
select.field {
  cursor: pointer;
}
textarea.field {
  resize: vertical;
  min-height: 120px;
}
.field-help {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.field-inline {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.field-inline input {
  flex: 1;
  min-width: 220px;
}
.form-msg {
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
  font-weight: 500;
}
.form-msg.error {
  color: #a8341f;
}
.form-msg.success {
  color: #193e00;
}

/* ---- Success Box ---- */
.submit-success {
  background: var(--paper);
  border: 2px solid var(--brand);
  border-radius: 16px;
  padding: 36px;
  text-align: center;
}
.success-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 26px;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ticket-number-display {
  display: inline-block;
  background: #fff;
  border: 2px dashed var(--brand);
  border-radius: 12px;
  padding: 16px 36px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.15em;
  margin: 16px 0;
  box-shadow: 0 4px 12px rgba(25, 62, 0, 0.08);
}
.success-note {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 540px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Ticket Detail View ---- */
.td-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(25, 62, 0, 0.12);
  margin-bottom: 24px;
}
.td-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  display: block;
}
.td-subject {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  margin: 4px 0;
}
.td-category {
  font-size: 14px;
  color: var(--muted);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-open { background: rgba(168, 52, 31, 0.12); color: #a8341f; border: 1px solid rgba(168, 52, 31, 0.3); }
.status-in_progress { background: rgba(176, 128, 0, 0.12); color: #8a6500; border: 1px solid rgba(176, 128, 0, 0.35); }
.status-resolved { background: rgba(25, 62, 0, 0.12); color: var(--brand); border: 1px solid rgba(25, 62, 0, 0.3); }
.status-closed { background: rgba(107, 102, 89, 0.12); color: var(--muted); border: 1px solid rgba(107, 102, 89, 0.3); }

/* Messages List */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 24px;
}
.msg-bubble {
  padding: 16px 20px;
  border-radius: 14px;
  max-width: 85%;
}
.msg-user {
  background: var(--paper);
  border: 1px solid rgba(25, 62, 0, 0.12);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.msg-staff {
  background: rgba(25, 62, 0, 0.05);
  border: 1px solid rgba(25, 62, 0, 0.2);
  border-bottom-left-radius: 4px;
}
.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.msg-sender {
  font-weight: 600;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 16px;
}
.msg-staff-tag {
  background: var(--brand);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.msg-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.msg-text {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0;
}

/* ---- Reply & Rating Forms ---- */
.reply-section, .rating-section {
  border-top: 1px solid rgba(25, 62, 0, 0.12);
  padding-top: 24px;
  margin-top: 12px;
}
.rating-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.star-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.star-btn {
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 0;
  line-height: 1;
}
.star-btn:hover {
  transform: scale(1.25);
}
.rating-display {
  background: var(--paper);
  border: 1px solid rgba(25, 62, 0, 0.12);
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-2);
  border-top: 1px solid rgba(25, 62, 0, 0.12);
}

/* ---- FAQ Shortcut Box ---- */
.faq-shortcut {
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid rgba(25, 62, 0, 0.12);
  border-radius: 16px;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.shortcut-text h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
}
.shortcut-text p {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0;
}
.shortcut-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Helper Utilities ---- */
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .support-panel, .submit-success, .faq-shortcut {
    padding: 24px;
  }
  .td-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .msg-bubble {
    max-width: 95%;
  }
  .field-inline input {
    width: 100%;
  }
  .shortcut-actions {
    width: 100%;
  }
  .shortcut-actions .btn {
    flex: 1;
    justify-content: center;
  }
}
