/* Mandatory «الدعم الفني» reply dialog (support-messages.js).

   A native modal <dialog> in the top layer, so it sits above the game-end
   and rating dialogs. Sized for 320px phones and 130% text: the card is a
   column whose middle scrolls, and the acknowledgement button stays in view. */

.support-dialog {
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1.5px solid rgba(201, 169, 97, 0.5);
  border-radius: 18px;
  background: linear-gradient(180deg, #1a1c2b 0%, #10111f 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 215, 0, 0.08);
  color: var(--ivory, #fff8e7);
  font-family: Cairo, system-ui, sans-serif;
  overflow: hidden;
}

.support-dialog::backdrop {
  background: rgba(6, 8, 14, 0.78);
  backdrop-filter: blur(3px);
}

.support-dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 36px);
  padding: 20px 18px 18px;
  gap: 14px;
}

.support-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.support-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(201, 169, 97, 0.16);
  border: 1px solid rgba(201, 169, 97, 0.4);
  font-size: 1.3rem;
}

.support-dialog-heading { min-width: 0; }

.support-dialog-title {
  margin: 0;
  color: var(--gold-bright, #ffd700);
  font-family: 'Reem Kufi', Cairo, sans-serif;
  font-size: 1.2rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.support-dialog-counter {
  margin: 2px 0 0;
  color: rgba(255, 248, 231, 0.7);
  font-size: 0.85rem;
}

.support-dialog-counter[hidden],
.support-dialog-quote[hidden],
.support-dialog-quote-text[hidden],
.support-dialog-error[hidden] { display: none; }

.support-dialog-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.support-dialog-quote {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-inline-start: 3px solid rgba(201, 169, 97, 0.7);
  border-radius: 10px;
  background: rgba(255, 248, 231, 0.05);
}

.support-dialog-quote-label {
  color: rgba(255, 248, 231, 0.72);
  font-size: 0.85rem;
  font-weight: 700;
}

.support-dialog-quote-text {
  margin: 4px 0 0;
  color: rgba(255, 248, 231, 0.82);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.support-dialog-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-align: start;
  unicode-bidi: plaintext;
}

.support-dialog-foot {
  display: grid;
  gap: 10px;
  flex: none;
}

.support-dialog-time {
  margin: 0;
  color: rgba(255, 248, 231, 0.62);
  font-size: 0.8rem;
}

.support-dialog-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 135, 147, 0.3);
  background: rgba(255, 135, 147, 0.08);
  color: #ffc0c6;
  font-size: 0.85rem;
  line-height: 1.6;
}

.support-dialog-ack {
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
}

.support-dialog-ack:disabled { cursor: wait; opacity: 0.75; }

.support-dialog-ack:focus-visible {
  outline: 3px solid var(--gold-bright, #ffd700);
  outline-offset: 3px;
}

.support-dialog[open] { animation: supportDialogIn 220ms ease-out; }

@keyframes supportDialogIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 360px) {
  .support-dialog { width: calc(100% - 24px); }
  .support-dialog-card { padding: 16px 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .support-dialog[open] { animation: none; }
}

/* «شن الجديد» (whats-new.js): the release's player lines in the same card.
   The list scrolls inside the card on a 360x740 phone; «تمام» stays in view. */
.whats-new-intro {
  margin: 0 0 10px;
  color: rgba(255, 248, 231, 0.78);
  font-size: 0.95rem;
  line-height: 1.7;
}

.whats-new-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.whats-new-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 248, 231, 0.05);
  border: 1px solid rgba(201, 169, 97, 0.18);
}

.whats-new-icon {
  flex: none;
  width: 1.75rem;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.6;
}

.whats-new-text {
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  text-align: start;
}
