/* Demon Rush Judge chat */

.dr-ai {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 2.75rem) var(--dr-gap) clamp(3rem, 7vh, 5rem);
}

.dr-ai-intro {
  text-align: center;
  margin-bottom: clamp(1.35rem, 3vh, 2rem);
}

.dr-ai-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.7rem 0.85rem;
}

.dr-ai-intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dr-gold);
  line-height: 1.15;
}

.dr-ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 181, 106, 0.42);
  background:
    linear-gradient(180deg, rgba(212, 181, 106, 0.16), rgba(212, 181, 106, 0.05));
  color: var(--dr-gold);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(212, 181, 106, 0.08);
}

.dr-ai-sub {
  margin: 0.85rem auto 0;
  max-width: 36rem;
  color: var(--dr-muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.55;
}

.dr-ai-training {
  margin: 0.7rem auto 0;
  max-width: 38rem;
  color: rgba(183, 168, 144, 0.78);
  font-size: 0.92rem;
  line-height: 1.55;
}

.dr-ai-discord-wrap {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.dr-ai-discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 190, 0.28);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a140f;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 244, 214, 0.55), transparent 42%),
    linear-gradient(180deg, #f0d79a 0%, var(--dr-gold) 48%, #a57d34 100%);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 236, 190, 0.22) inset,
    0 0 22px rgba(212, 181, 106, 0.22);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.dr-ai-discord-btn:hover,
.dr-ai-discord-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 236, 190, 0.3) inset,
    0 0 28px rgba(212, 181, 106, 0.32);
  outline: none;
}

.dr-ai-shell {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: 1.1rem;
  background:
    linear-gradient(165deg, rgba(212, 181, 106, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(42, 35, 28, 0.78), rgba(18, 15, 13, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(212, 181, 106, 0.18),
    0 24px 50px rgba(0, 0, 0, 0.35);
}

.dr-ai-messages {
  min-height: min(46vh, 420px);
  max-height: min(56vh, 560px);
  overflow-y: auto;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 1rem;
  border-radius: 0.85rem;
  background: rgba(10, 8, 7, 0.45);
  box-shadow: inset 0 0 0 1px rgba(138, 122, 98, 0.18);
}

.dr-ai-bubble {
  max-width: min(36rem, 92%);
}

.dr-ai-bubble p {
  margin: 0;
  line-height: 1.55;
  font-size: 1rem;
  white-space: pre-wrap;
}

.dr-ai-bubble-assistant {
  justify-self: start;
  padding: 0.95rem 1.1rem;
  border-radius: 0.85rem 0.85rem 0.85rem 0.25rem;
  background:
    linear-gradient(160deg, rgba(212, 181, 106, 0.12), transparent 55%),
    rgba(36, 30, 24, 0.95);
  box-shadow: inset 0 0 0 1px rgba(212, 181, 106, 0.2);
  color: var(--dr-text);
}

.dr-ai-bubble-user {
  justify-self: end;
  padding: 0.9rem 1.05rem;
  border-radius: 0.85rem 0.85rem 0.25rem 0.85rem;
  background:
    linear-gradient(160deg, rgba(196, 90, 44, 0.18), transparent 55%),
    rgba(54, 36, 26, 0.95);
  box-shadow: inset 0 0 0 1px rgba(196, 90, 44, 0.28);
  color: var(--dr-text);
  text-align: left;
}

.dr-ai-bubble-loading {
  opacity: 0.78;
  font-style: italic;
  color: var(--dr-muted);
}

.dr-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dr-ai-chip {
  appearance: none;
  border: 1px solid rgba(154, 139, 114, 0.38);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--dr-muted);
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.3;
  padding: 0.55rem 0.9rem;
  text-align: left;
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.dr-ai-chip:hover,
.dr-ai-chip:focus-visible {
  color: var(--dr-gold);
  border-color: rgba(212, 181, 106, 0.55);
  background: rgba(212, 181, 106, 0.06);
  outline: none;
  transform: translateY(-1px);
}

.dr-ai-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.dr-ai-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.dr-ai-composer input {
  width: 100%;
  min-height: 2.9rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 122, 98, 0.35);
  background: rgba(12, 10, 8, 0.72);
  color: var(--dr-text);
  font: inherit;
  padding: 0.7rem 1.1rem;
}

.dr-ai-composer input::placeholder {
  color: rgba(183, 168, 144, 0.65);
}

.dr-ai-composer input:focus-visible {
  outline: none;
  border-color: rgba(212, 181, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 181, 106, 0.12);
}

.dr-ai-composer input:disabled,
.dr-ai-send:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.dr-ai-send {
  appearance: none;
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a140f;
  cursor: pointer;
  background: linear-gradient(180deg, #e2c784 0%, var(--dr-gold) 48%, #b89145 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 236, 190, 0.16) inset;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.dr-ai-send:hover:not(:disabled),
.dr-ai-send:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(212, 181, 106, 0.18);
  outline: none;
}

.dr-ai-note {
  margin: 0;
  text-align: center;
  color: rgba(183, 168, 144, 0.82);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.dr-judge-appeal {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(212, 181, 106, 0.16);
}

.dr-judge-appeal-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(212, 181, 106, 0.92);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.dr-judge-appeal-toggle:hover,
.dr-judge-appeal-toggle:focus-visible {
  color: var(--dr-gold);
  outline: none;
  text-decoration: underline;
}

.dr-judge-appeal-toggle:disabled {
  cursor: default;
  opacity: 0.7;
  text-decoration: none;
}

.dr-judge-appeal-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.dr-judge-appeal-label {
  display: grid;
  gap: 0.4rem;
  color: var(--dr-muted);
  font-size: 0.86rem;
}

.dr-judge-appeal-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(138, 122, 98, 0.35);
  background: rgba(12, 10, 8, 0.72);
  color: var(--dr-text);
  font: inherit;
  padding: 0.7rem 0.85rem;
  resize: vertical;
}

.dr-judge-appeal-input:focus-visible {
  outline: none;
  border-color: rgba(212, 181, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 181, 106, 0.12);
}

.dr-judge-appeal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dr-judge-appeal-submit {
  appearance: none;
  min-height: 2.4rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a140f;
  cursor: pointer;
  background: linear-gradient(180deg, #e2c784 0%, var(--dr-gold) 48%, #b89145 100%);
}

.dr-judge-appeal-submit:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.dr-judge-appeal-status {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(212, 181, 106, 0.95);
}

.dr-judge-appeal-status.is-error {
  color: #e8b4a0;
}

@media (max-width: 640px) {
  .dr-ai-composer {
    grid-template-columns: 1fr;
  }

  .dr-ai-send {
    width: 100%;
  }
}
