/* ── MODALS (shared) ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-sheet {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 430px;
  padding: 20px 16px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  max-height: 70vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-bottom: none;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  direction: rtl;
}
.modal-close-btn {
  background: var(--surface2);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft);
  transition: background 0.15s;
}
.modal-close-btn:active { background: var(--border); }

/* ── Friend Request Items ───────────────────────────── */
.freq-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.freq-item:last-child { border-bottom: none; }

.freq-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.freq-body { flex: 1; }
.freq-name { font-size: 14px; font-weight: 800; color: var(--text); direction: rtl; }
.freq-xp   { font-size: 11px; color: var(--text-soft); }

.freq-accept {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  min-height: 36px;
  transition: transform 0.15s;
}
.freq-accept:active { transform: scale(0.93); }

.freq-decline {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  min-height: 36px;
  transition: background 0.15s;
}
.freq-decline:active { background: var(--border); }

/* ── Message Picker ─────────────────────────────────── */
.msg-picker-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg-pill {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  direction: rtl;
  min-height: 48px;
  width: 100%;
  transition: background 0.15s, transform 0.15s;
}
.msg-pill:active { background: var(--surface2); transform: scale(0.97); }

/* ── Desktop: center modal instead of bottom-sheet ── */
@media (min-width: 900px) {
  .modal-overlay {
    align-items: center;
  }
  .modal-sheet {
    width: 92%;
    max-width: 520px;
    border-radius: 24px;
    border-bottom: 1px solid var(--border);
    transform: scale(0.96);
  }
  .modal-overlay.open .modal-sheet {
    transform: scale(1);
  }
}

