.msgr-guide-wrap {
  max-width: 760px;
  margin: 1.25rem auto 6.5rem;
  padding: 0 1rem;
  direction: rtl;
  text-align: right;
}
.msgr-guide-card {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  padding: 1.35rem;
  color: #f8fafc;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.msgr-guide-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.22rem;
  color: #ffffff;
}
.msgr-guide-lead {
  margin: 0 0 1.1rem;
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.65;
}
.msgr-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.msgr-step {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.msgr-step-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
}
.msgr-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msgr-step p {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
}
.msgr-open-pill {
  border: none;
  border-radius: 999px;
  padding: 0.48rem 1.05rem;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: inherit;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.msgr-open-tg { background: #1d9bf0; }
.msgr-open-wa { background: #128c7e; }
.msgr-open-magic { background: #2563eb; }

/* الأيقونتان العائمتان بأسلوب مسنجر فيسبوك */
.msgr-dock {
  position: fixed;
  left: 16px;
  bottom: 22px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.msgr-head-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.msgr-head-label {
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.26rem 0.72rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.msgr-circle {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s ease;
}
.msgr-circle:active { transform: scale(0.92); }
.msgr-circle-tg { background: #229ED9; }
.msgr-circle-wa { background: #25D366; }

.msgr-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}
.msgr-hidden { display: none !important; }

@keyframes msgrBounce {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.16) rotate(-6deg); }
  70% { transform: scale(1.12) rotate(6deg); }
}
.msgr-bounce { animation: msgrBounce 0.65s ease 2; }

/* عرض كل تطبيق بانفراد وبكامل الشاشة عند الضغط على أيقونته */
.msgr-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  background: #0b1220;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msgr-fs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: #020617;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  direction: rtl;
}
.msgr-fs-title {
  font-size: 0.9rem;
  font-weight: 800;
}
.msgr-fs-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.msgr-switch-btn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 999px;
  padding: 0.32rem 0.78rem;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.msgr-close-btn {
  background: #ef4444;
  border: none;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
}
.msgr-fs-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.msgr-fs-body > * {
  flex: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* MOBILE CHAT HEADS V2 */
body {
  height: auto;
  min-height: 100dvh;
}
.mobile-switcher { display: none !important; }
.msgr-guide-wrap { width: 100%; margin-bottom: 160px; }
.msgr-guide-card { padding: 18px; }
.msgr-guide-lead { font-size: 14px; }
.msgr-dock {
  left: max(12px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  gap: 10px;
}
.msgr-head-item { flex-direction: row-reverse; }
.msgr-circle { width: 56px; height: 56px; flex-shrink: 0; }
.msgr-head-label { font-size: 11px; }
.msgr-fs-bar {
  flex-wrap: wrap;
  padding-top: max(10px, env(safe-area-inset-top));
}
.msgr-fs-actions { flex-wrap: wrap; }
.msgr-fs-body .pane { min-height: 0; min-width: 0; }
.msgr-fs-body .chat-header,
.msgr-fs-body .quick-commands,
.msgr-fs-body .chat-input-bar { flex-shrink: 0; }
.msgr-fs-body .chat-messages {
  min-height: 0;
  overscroll-behavior: contain;
}
.msgr-fs-body .chat-input-bar {
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.msgr-fs-body .chat-input-bar input {
  min-width: 0;
  width: 0;
  font-size: 16px;
}
.msgr-fs-body .header-info { min-width: 0; }
.msgr-fs-body .header-title { flex-wrap: wrap; overflow-wrap: anywhere; }
.msgr-fs-body .inline-keyboard {
  grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
}
.msgr-fs-body .msg-bubble { overflow-wrap: anywhere; }
button:focus-visible, a:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}
@media (max-width: 480px) {
  .msgr-fs-body .header-pill { display: none; }
  .msgr-fs-body .chat-header { padding: 10px; gap: 8px; }
  .msgr-fs-title { font-size: 13px; }
  .msgr-guide-card h2 { font-size: 20px; }
  .msg-wrap { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) {
  .msgr-bounce { animation: none; }
}
