/* ============================================================
   CHAT MINI-GAMES — Neon Arcade × Premium Card Game
   Two Truths & A Lie  |  Guess My Secret
   ============================================================ */

/* ── Google Fonts import ──────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  --mg-font-display: 'Outfit', sans-serif;
  --mg-font-mono: 'Space Mono', monospace;
  --mg-neon-pink: #ff2d78;
  --mg-neon-cyan: #00f0ff;
  --mg-neon-purple: #b44dff;
  --mg-neon-green: #39ff7f;
  --mg-neon-gold: #ffd700;
  --mg-bg-card: rgba(18, 10, 30, 0.92);
  --mg-bg-glass: rgba(255, 255, 255, 0.04);
  --mg-border-glow: rgba(180, 77, 255, 0.3);
  --mg-radius: 16px;
  --mg-radius-sm: 10px;
  --mg-shadow-neon: 0 0 20px rgba(255, 45, 120, 0.15), 0 0 60px rgba(180, 77, 255, 0.08);
  --mg-shadow-deep: 0 12px 40px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ── Allow game messages to use full chat width ──────────── */
.message:has(.mg-game-message) {
  max-width: 95% !important;
}

/* ── Game Message Container ───────────────────────────────── */
.mg-game-message {
  width: 100%;
  max-width: min(340px, calc(100vw - 48px));
  margin: 16px auto;
  animation: mg-slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mg-slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Game Card Shell ──────────────────────────────────────── */
.mg-card {
  position: relative;
  background: var(--mg-bg-card);
  border: 1px solid var(--mg-border-glow);
  border-radius: var(--mg-radius);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--mg-shadow-neon), var(--mg-shadow-deep);
  font-family: var(--mg-font-display);
}

.mg-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--mg-radius);
  padding: 1px;
  background: linear-gradient(135deg, var(--mg-neon-pink), var(--mg-neon-purple), var(--mg-neon-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

/* Ambient glow behind card */
.mg-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(180, 77, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Card Header ──────────────────────────────────────────── */
.mg-card-header {
  position: relative;
  z-index: 2;
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.mg-card-icon--truths {
  background: linear-gradient(135deg, var(--mg-neon-pink), var(--mg-neon-purple));
  box-shadow: 0 4px 16px rgba(255, 45, 120, 0.3);
}

.mg-card-icon--secret {
  background: linear-gradient(135deg, var(--mg-neon-cyan), var(--mg-neon-purple));
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.3);
}

.mg-card-title {
  flex: 1;
  min-width: 0;
}

.mg-card-title h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mg-card-title span {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mg-font-mono);
}

/* ── Card Body ────────────────────────────────────────────── */
.mg-card-body {
  position: relative;
  z-index: 2;
  padding: 16px 20px 20px;
}

.mg-card-body p.mg-instruction {
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

/* ── Statement / Option Buttons ───────────────────────────── */
.mg-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mg-option-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--mg-bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--mg-radius-sm);
  color: #fff;
  font-family: var(--mg-font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.mg-option-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(180, 77, 255, 0.12), rgba(255, 45, 120, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mg-option-btn:hover::before,
.mg-option-btn:focus::before {
  opacity: 1;
}

.mg-option-btn:active {
  transform: scale(0.97);
}

/* Option number badge */
.mg-option-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mg-font-mono);
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.mg-option-btn:hover .mg-option-num {
  background: rgba(180, 77, 255, 0.2);
  border-color: rgba(180, 77, 255, 0.4);
  color: var(--mg-neon-purple);
}

.mg-option-text {
  flex: 1;
  min-width: 0;
}

/* ── Bounce animation on tap ──────────────────────────────── */
.mg-option-btn.mg-tapped {
  animation: mg-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mg-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(0.93); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ── Selected state (before reveal) ───────────────────────── */
.mg-option-btn.mg-selected {
  border-color: var(--mg-neon-purple);
  background: rgba(180, 77, 255, 0.1);
}

.mg-option-btn.mg-selected .mg-option-num {
  background: var(--mg-neon-purple);
  border-color: var(--mg-neon-purple);
  color: #fff;
}

/* ── Disabled after selection ─────────────────────────────── */
.mg-option-btn.mg-disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* ── Reveal States ────────────────────────────────────────── */

/* Correct answer (the lie / the secret) */
.mg-option-btn.mg-reveal-correct {
  border-color: var(--mg-neon-green);
  background: rgba(57, 255, 127, 0.08);
  pointer-events: none;
  animation: mg-glowCorrect 1.5s ease infinite alternate;
}

.mg-option-btn.mg-reveal-correct .mg-option-num {
  background: var(--mg-neon-green);
  border-color: var(--mg-neon-green);
  color: #000;
}

@keyframes mg-glowCorrect {
  from { box-shadow: 0 0 8px rgba(57, 255, 127, 0.2); }
  to { box-shadow: 0 0 20px rgba(57, 255, 127, 0.35), 0 0 40px rgba(57, 255, 127, 0.1); }
}

/* Wrong answer */
.mg-option-btn.mg-reveal-wrong {
  border-color: rgba(255, 45, 120, 0.4);
  background: rgba(255, 45, 120, 0.06);
  pointer-events: none;
  opacity: 0.6;
}

.mg-option-btn.mg-reveal-wrong .mg-option-num {
  background: rgba(255, 45, 120, 0.3);
  border-color: rgba(255, 45, 120, 0.5);
  color: var(--mg-neon-pink);
}

/* User's pick that was wrong */
.mg-option-btn.mg-reveal-picked-wrong {
  border-color: var(--mg-neon-pink);
  background: rgba(255, 45, 120, 0.1);
  pointer-events: none;
  animation: mg-shake 0.5s ease;
}

@keyframes mg-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.mg-option-btn.mg-reveal-picked-wrong .mg-option-num {
  background: var(--mg-neon-pink);
  border-color: var(--mg-neon-pink);
  color: #fff;
}

/* User's pick that was correct */
.mg-option-btn.mg-reveal-picked-correct {
  border-color: var(--mg-neon-green);
  background: rgba(57, 255, 127, 0.12);
  pointer-events: none;
  animation: mg-glowCorrect 1.5s ease infinite alternate;
}

.mg-option-btn.mg-reveal-picked-correct .mg-option-num {
  background: var(--mg-neon-green);
  border-color: var(--mg-neon-green);
  color: #000;
}

/* ── Reveal Badge ─────────────────────────────────────────── */
.mg-reveal-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mg-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: auto;
  flex-shrink: 0;
}

.mg-reveal-badge--lie,
.mg-reveal-badge--secret {
  background: rgba(57, 255, 127, 0.15);
  color: var(--mg-neon-green);
}

.mg-reveal-badge--truth,
.mg-reveal-badge--wrong {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
}

.mg-reveal-badge--picked {
  background: rgba(255, 45, 120, 0.15);
  color: var(--mg-neon-pink);
}

/* ── Suspense Overlay (pre-reveal countdown) ──────────────── */
.mg-suspense-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--mg-radius);
  animation: mg-fadeIn 0.3s ease;
}

@keyframes mg-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mg-suspense-text {
  font-family: var(--mg-font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-align: center;
}

.mg-suspense-dots {
  display: flex;
  gap: 8px;
}

.mg-suspense-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mg-neon-purple);
  animation: mg-dotPulse 1.2s ease infinite;
}

.mg-suspense-dot:nth-child(2) { animation-delay: 0.2s; }
.mg-suspense-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes mg-dotPulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* ── Result Banner ────────────────────────────────────────── */
.mg-result-banner {
  position: relative;
  z-index: 2;
  margin: 12px 20px 20px;
  padding: 14px 16px;
  border-radius: var(--mg-radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: mg-resultSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

@keyframes mg-resultSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mg-result-banner--correct {
  background: rgba(57, 255, 127, 0.08);
  border: 1px solid rgba(57, 255, 127, 0.2);
}

.mg-result-banner--wrong {
  background: rgba(255, 45, 120, 0.08);
  border: 1px solid rgba(255, 45, 120, 0.2);
}

.mg-result-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.mg-result-text {
  flex: 1;
}

.mg-result-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.mg-result-text span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Input Phase (creator entering statements) ────────────── */
.mg-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.mg-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mg-input-label {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mg-font-mono);
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.mg-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--mg-radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--mg-font-display);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mg-input-field::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.mg-input-field:focus {
  border-color: var(--mg-neon-purple);
  box-shadow: 0 0 0 3px rgba(180, 77, 255, 0.1);
}

/* Special input for "the lie" / "the secret" */
.mg-input-field--special {
  border-color: rgba(255, 45, 120, 0.3);
}

.mg-input-field--special:focus {
  border-color: var(--mg-neon-pink);
  box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.1);
}

/* ── Hints Section (Guess My Secret) ──────────────────────── */
.mg-hints {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.mg-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: var(--mg-radius-sm);
  animation: mg-hintReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mg-hint:nth-child(1) { animation-delay: 0.1s; }
.mg-hint:nth-child(2) { animation-delay: 0.3s; }
.mg-hint:nth-child(3) { animation-delay: 0.5s; }

@keyframes mg-hintReveal {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.mg-hint-icon {
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.mg-hint-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* ── Submit / Action Button ───────────────────────────────── */
.mg-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--mg-radius-sm);
  font-family: var(--mg-font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.mg-submit-btn--primary {
  background: linear-gradient(135deg, var(--mg-neon-pink), var(--mg-neon-purple));
  box-shadow: 0 4px 16px rgba(255, 45, 120, 0.25);
}

.mg-submit-btn--primary:hover {
  box-shadow: 0 6px 24px rgba(255, 45, 120, 0.35);
  transform: translateY(-1px);
}

.mg-submit-btn--primary:active {
  transform: translateY(0) scale(0.98);
}

.mg-submit-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mg-submit-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mg-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Game Picker (choose which game to start) ─────────────── */
.mg-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-picker-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: var(--mg-bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--mg-radius-sm);
  color: #fff;
  font-family: var(--mg-font-display);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}

.mg-picker-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(180, 77, 255, 0.3);
  transform: translateY(-1px);
}

.mg-picker-btn:active {
  transform: scale(0.98);
}

.mg-picker-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.mg-picker-icon--truths {
  background: linear-gradient(135deg, rgba(255, 45, 120, 0.2), rgba(180, 77, 255, 0.2));
}

.mg-picker-icon--secret {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(180, 77, 255, 0.2));
}

.mg-picker-info h5 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 700;
}

.mg-picker-info p {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

/* ── Confetti / Sparkle Canvas ────────────────────────────── */
.mg-confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  border-radius: var(--mg-radius);
}

/* ── Sparkle Effect (CSS-only fallback) ───────────────────── */
.mg-sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 20;
  animation: mg-sparkleAnim 0.8s ease-out forwards;
}

@keyframes mg-sparkleAnim {
  0% { transform: scale(0) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.5) rotate(180deg); opacity: 0.8; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* ── Flip Animation for Reveal ────────────────────────────── */
.mg-flip-container {
  perspective: 800px;
}

.mg-flip-inner {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.mg-flip-inner.mg-flipped {
  transform: rotateY(180deg);
}

/* ── Glow Pulse on card during suspense ───────────────────── */
.mg-card.mg-suspense-active {
  animation: mg-cardPulse 1.5s ease infinite;
}

@keyframes mg-cardPulse {
  0%, 100% { box-shadow: var(--mg-shadow-neon), var(--mg-shadow-deep); }
  50% { box-shadow: 0 0 30px rgba(255, 45, 120, 0.3), 0 0 80px rgba(180, 77, 255, 0.15), var(--mg-shadow-deep); }
}

/* ── System Message for Game Events ───────────────────────── */
.mg-system-msg {
  text-align: center;
  padding: 8px 16px;
  margin: 8px auto;
  max-width: 280px;
  animation: mg-fadeIn 0.4s ease;
}

.mg-system-msg span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(180, 77, 255, 0.08);
  border: 1px solid rgba(180, 77, 255, 0.15);
  font-family: var(--mg-font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Game Trigger Button (in chat input area) ─────────────── */
.mg-trigger-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(180, 77, 255, 0.2);
  background: rgba(180, 77, 255, 0.08);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.mg-trigger-btn:hover {
  background: rgba(180, 77, 255, 0.15);
  border-color: rgba(180, 77, 255, 0.4);
  transform: scale(1.05);
}

.mg-trigger-btn:active {
  transform: scale(0.95);
}

/* ── Waiting State ────────────────────────────────────────── */
.mg-waiting {
  text-align: center;
  padding: 20px 16px;
}

.mg-waiting-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.mg-waiting-spinner {
  display: inline-flex;
  gap: 6px;
}

.mg-waiting-spinner span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mg-neon-purple);
  animation: mg-waitBounce 1s ease infinite;
}

.mg-waiting-spinner span:nth-child(2) { animation-delay: 0.15s; }
.mg-waiting-spinner span:nth-child(3) { animation-delay: 0.3s; }

@keyframes mg-waitBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 380px) {
  .mg-game-message {
    max-width: calc(100% - 24px);
  }
  .mg-card-header {
    padding: 14px 16px 12px;
  }
  .mg-card-body {
    padding: 12px 16px 16px;
  }
  .mg-option-btn {
    padding: 12px 14px;
  }
}

/* ══════════════════════════════════════════════════════════
   COMPOSER OVERLAY
   Floating panel for game creation — NOT inside chat messages.
   Nothing touches the chat until the user hits Submit.
   ══════════════════════════════════════════════════════════ */

.mg-composer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mg-composer-overlay.mg-composer-visible {
  opacity: 1;
  pointer-events: auto;
}

.mg-composer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mg-composer-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 16px 24px;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.mg-composer-visible .mg-composer-panel {
  transform: translateY(0);
}

.mg-composer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  padding: 0;
}

.mg-composer-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mg-composer-content {
  /* The .mg-card lives here */
}

/* Inside the composer, the card needs no extra margin */
.mg-composer-content > .mg-card {
  margin: 0;
}

@media (max-width: 380px) {
  .mg-composer-panel {
    padding: 12px 12px 20px;
  }
}
