/* ===== SUPPORT PAGE ===== */

.nav-back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.nav-back-btn:hover { background: var(--bg-hover); }

.navbar-page-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
}

/* ── Ticket list ── */
.support-loading {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.support-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 14px; font-weight: 500;
}

.ticket-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.ticket-item:hover { border-color: rgba(255,255,255,0.18); transform: translateY(-1px); }
.ticket-item:active { transform: scale(0.99); }
.ticket-item.has-unread { border-color: var(--gold); }

.ticket-item-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}

.ticket-subject {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.ticket-badge {
  background: var(--gold);
  color: #000;
  font-size: 11px; font-weight: 800;
  border-radius: 20px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.ticket-item-bottom {
  display: flex; align-items: center; justify-content: space-between;
}

.ticket-status-pill {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 20px;
}
.ticket-status-pill.open     { background: rgba(255,180,0,0.15); color: #e09800; }
.ticket-status-pill.answered { background: rgba(74,222,128,0.15); color: #22c55e; }
.ticket-status-pill.closed   { background: var(--bg-elevated); color: var(--text-muted); }

.ticket-date {
  font-size: 12px; color: var(--text-muted);
}

/* ── New ticket form ── */
.support-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
}

.support-form-title {
  font-size: 18px; font-weight: 800;
  margin-bottom: 20px;
}

.support-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* ── Chat ── */
.chat-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.chat-subject {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: calc(100vh - 340px);
  overflow-y: auto;
  padding: 4px 0 8px;
  -webkit-overflow-scrolling: touch;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}
.chat-msg.user  { align-self: flex-end; align-items: flex-end; }
.chat-msg.admin { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px; line-height: 1.45;
  word-break: break-word;
}
.chat-msg.user  .chat-bubble {
  background: var(--gold);
  color: #000;
  border-bottom-right-radius: 4px;
}
.chat-msg.admin .chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-time {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px; padding: 0 2px;
}

.chat-input-row {
  display: flex; align-items: flex-end; gap: 10px;
  margin-top: 12px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.chat-input {
  flex: 1;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  min-height: 44px;
  max-height: 120px;
  overflow-y: auto;
}

.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.chat-send-btn:hover  { opacity: 0.85; }
.chat-send-btn:active { transform: scale(0.93); }
