/* ─── Shahsara Notification & Invite System Styles ─── */

/* 1. Global In-App Floating Top Banner */
#shahsara-invite-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 92%;
  max-width: 520px;
  z-index: 2147483645;
  background: linear-gradient(135deg, rgba(12, 38, 24, 0.98) 0%, rgba(5, 20, 12, 0.98) 100%);
  border: 1.5px solid #D4AF37;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.75), 0 0 18px rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, Tahoma, sans-serif;
  padding: 12px 14px;
  color: #FFF;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
#shahsara-invite-banner.banner-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.shahsara-ib-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shahsara-ib-avatar-box {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.shahsara-ib-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid #D4AF37;
  object-fit: cover;
  background: #06160D;
}
.shahsara-ib-game-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #D4AF37;
  color: #120900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  border: 1.5px solid #06160D;
}
.shahsara-ib-content {
  flex: 1;
  min-width: 0;
}
.shahsara-ib-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFE082;
  margin: 0 0 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shahsara-ib-subtitle {
  font-size: 12px;
  color: #C8E6C9;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shahsara-ib-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.shahsara-ib-btn {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s, background 0.15s;
}
.shahsara-ib-btn:active {
  transform: scale(0.94);
}
.shahsara-ib-btn-accept {
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  color: #150E00;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}
.shahsara-ib-btn-reject {
  background: rgba(239, 83, 80, 0.2);
  color: #FF8A80;
  border: 1px solid rgba(239, 83, 80, 0.4);
}
.shahsara-ib-progress {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}
.shahsara-ib-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFE082, #D4AF37);
  width: 100%;
  transition: width 0.1s linear;
}

/* 2. Generic Modal Overlay */
.shahsara-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, Tahoma, sans-serif;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.shahsara-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.shahsara-dialog-card {
  max-width: 420px;
  width: 100%;
  background: linear-gradient(135deg, #0A2416 0%, #05150C 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  border-radius: 22px;
  padding: 24px 22px;
  color: #FFF;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.85), 0 0 24px rgba(212, 175, 55, 0.2);
  text-align: center;
  animation: shahsaraPop 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
@keyframes shahsaraPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 3. Notification Permission Modal Specifics */
.shahsara-perm-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.05) 70%);
  border: 1.5px solid #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  font-size: 28px;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}
.shahsara-dialog-title {
  font-size: 17px;
  font-weight: 900;
  color: #FFE082;
  margin: 0 0 10px 0;
}
.shahsara-perm-list {
  text-align: right;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 14px 0 18px 0;
}
.shahsara-perm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #E0E0E0;
  line-height: 1.5;
  margin-bottom: 8px;
}
.shahsara-perm-item:last-child {
  margin-bottom: 0;
}
.shahsara-perm-item-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}
.shahsara-dialog-btns {
  display: flex;
  gap: 10px;
}
.shahsara-btn-full {
  flex: 1;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
}
.shahsara-btn-full:active {
  transform: scale(0.96);
}
.shahsara-btn-gold {
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  color: #150E00;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}
.shahsara-btn-dim {
  background: rgba(255, 255, 255, 0.08);
  color: #BBB;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 4. Active Game Warning Modal */
.shahsara-warning-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 83, 80, 0.3) 0%, rgba(239, 83, 80, 0.05) 70%);
  border: 1.5px solid #EF5350;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px auto;
  font-size: 30px;
  box-shadow: 0 0 16px rgba(239, 83, 80, 0.4);
}
.shahsara-warning-text {
  font-size: 13px;
  line-height: 1.7;
  color: #FFCDD2;
  background: rgba(183, 28, 28, 0.15);
  border: 1px dashed rgba(239, 83, 80, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0 18px 0;
  text-align: right;
}
.shahsara-btn-danger {
  background: linear-gradient(135deg, #EF5350 0%, #C62828 100%);
  color: #FFF;
  box-shadow: 0 4px 14px rgba(239, 83, 80, 0.35);
}

/* 5. Invite Friends Modal */
.shahsara-friends-modal-box {
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.shahsara-friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.shahsara-friends-close {
  background: transparent;
  border: none;
  color: #AAA;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}
/* ─── Share Room Link Section per User Request ─── */
.shahsara-share-room-section {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(0, 230, 118, 0.07));
  border: 1.2px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.shahsara-share-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shahsara-share-tag-badge {
  font-size: 12px;
  font-weight: 700;
  color: #FFE082;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shahsara-room-id-tag {
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 8px;
  border-radius: 8px;
  color: #00E676;
  direction: ltr;
  letter-spacing: 0.5px;
}

.shahsara-share-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.shahsara-btn-share-main {
  flex: 1;
  background: linear-gradient(135deg, #00C853 0%, #007E33 100%);
  border: 1.2px solid #69F0AE;
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 200, 83, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.shahsara-btn-share-main:hover {
  background: linear-gradient(135deg, #00E676 0%, #009624 100%);
  border-color: #B9F6CA;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 230, 118, 0.45);
}

.shahsara-btn-share-main:active {
  transform: scale(0.97);
}

.shahsara-share-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.shahsara-btn-copy-link {
  background: rgba(255, 255, 255, 0.08);
  border: 1.2px solid rgba(212, 175, 55, 0.4);
  color: #FFE082;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.shahsara-btn-copy-link:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #FFE082;
  color: #FFF;
}

.shahsara-btn-copy-link:active {
  transform: scale(0.96);
}

.shahsara-friends-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0 12px 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
}

.shahsara-friends-divider::before,
.shahsara-friends-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.shahsara-friends-divider:not(:empty)::before {
  margin-left: 10px;
}

.shahsara-friends-divider:not(:empty)::after {
  margin-right: 10px;
}

.shahsara-friends-search {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #FFF;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  margin-bottom: 12px;
}
.shahsara-friends-search:focus {
  border-color: #D4AF37;
}
.shahsara-friends-list {
  flex: 1;
  overflow-y: auto;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.shahsara-friend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  transition: background 0.15s;
}
.shahsara-friend-row:hover {
  background: rgba(212, 175, 55, 0.08);
}
.shahsara-fr-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.shahsara-fr-avatar-box {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.shahsara-fr-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #D4AF37;
  object-fit: cover;
  background: #081B10;
}
.shahsara-online-dot {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #0A2416;
}
.shahsara-online-dot.online {
  background: #3DDC84;
  box-shadow: 0 0 6px #3DDC84;
}
.shahsara-online-dot.offline {
  background: #757575;
}
.shahsara-fr-details {
  text-align: right;
  min-width: 0;
}
.shahsara-fr-name {
  font-size: 13px;
  font-weight: 800;
  color: #FFF;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shahsara-status-tag {
  display: inline-block;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 8px;
  font-weight: 700;
}
.shahsara-status-tag.online {
  background: rgba(61, 220, 132, 0.18);
  color: #69F0AE;
  border: 1px solid rgba(61, 220, 132, 0.4);
}
.shahsara-status-tag.offline {
  background: rgba(158, 158, 158, 0.15);
  color: #BDBDBD;
  border: 1px solid rgba(158, 158, 158, 0.3);
}
.shahsara-fr-invite-btn {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
  flex-shrink: 0;
}
.shahsara-fr-invite-btn.online {
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  color: #150E00;
}
.shahsara-fr-invite-btn.offline {
  background: rgba(142, 68, 173, 0.25);
  color: #D7BDE2;
  border: 1px solid rgba(175, 122, 197, 0.4);
}
.shahsara-fr-invite-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}
.shahsara-fr-invite-btn.sent {
  background: rgba(61, 220, 132, 0.25) !important;
  color: #69F0AE !important;
  border: 1px solid #69F0AE !important;
}

/* 6. Waiting Room Invite Friends Button (Strictly Waiting Room Only) */
#shahsara-room-invite-trigger {
  position: fixed;
  top: 60px;
  right: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1.5px solid #D4AF37;
  background: linear-gradient(135deg, rgba(16, 54, 32, 0.96) 0%, rgba(7, 24, 14, 0.98) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2147483645;
  display: none !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  direction: rtl;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 12px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

#shahsara-room-invite-trigger:hover {
  transform: translateY(-1px);
  border-color: #FFE082;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.8), 0 0 18px rgba(212, 175, 55, 0.55);
}

#shahsara-room-invite-trigger:active {
  transform: scale(0.96);
}

#shahsara-room-invite-trigger .shahsara-invite-fab-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#shahsara-room-invite-trigger .shahsara-add-user-icon {
  width: 18px;
  height: 18px;
  fill: #FFE082;
}

#shahsara-room-invite-trigger .shahsara-invite-fab-text {
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #FFE082;
  white-space: nowrap;
}

#shahsara-room-invite-trigger.visible {
  display: inline-flex !important;
}

/* 7. Toast Alerts */
#shahsara-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 2147483647;
  background: rgba(7, 24, 15, 0.95);
  border: 1px solid #D4AF37;
  color: #FFF;
  padding: 11px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, Tahoma, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#shahsara-toast.toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─── 8. Global Lobby Group Chat Room (Directly Below Main Game Icons) ─── */
#shahsara-global-chat-wrap {
  position: fixed;
  top: 236px;
  left: 0;
  right: 0;
  z-index: 900;
  display: none;
  justify-content: center;
  padding: 0 16px;
  box-sizing: border-box;
  pointer-events: none;
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, Tahoma, sans-serif;
  transition: top 0.25s ease, opacity 0.2s ease;
}

#shahsara-global-chat-wrap.sgc-visible {
  display: flex;
}

#shahsara-global-chat-wrap.has-rejoin-banner {
  top: 292px;
}

/* Respect Desktop Sidebar on Wide Screens (RTL: Sidebar is on Right) */
@media (min-width: 640px) and (max-width: 1199px) {
  #shahsara-global-chat-wrap {
    right: 84px;
  }
}
@media (min-width: 1200px) {
  #shahsara-global-chat-wrap {
    right: 230px;
  }
}

.sgc-container {
  width: 100%;
  max-width: 888px;
  pointer-events: auto;
  position: relative;
}

.sgc-card {
  width: 100%;
  height: clamp(220px, calc(100dvh - 314px), 315px);
  background: linear-gradient(160deg, rgba(12, 34, 21, 0.97) 0%, rgba(6, 18, 11, 0.98) 100%);
  border: 1.2px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 16px rgba(212, 175, 55, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

@media (min-width: 640px) {
  .sgc-card {
    height: clamp(250px, calc(100dvh - 270px), 370px);
  }
}

/* When a game accordion is expanded, collapse chat into a non-blocking bottom pill */
#shahsara-global-chat-wrap.sgc-dropdown-open {
  top: auto !important;
  bottom: 76px;
}
@media (min-width: 640px) {
  #shahsara-global-chat-wrap.sgc-dropdown-open {
    bottom: 16px;
  }
}
#shahsara-global-chat-wrap.sgc-dropdown-open .sgc-card {
  display: none;
}
.sgc-minimized-pill {
  display: none;
  width: 100%;
  background: linear-gradient(135deg, #143321 0%, #091B11 100%);
  border: 1.2px solid rgba(212, 175, 55, 0.55);
  border-radius: 14px;
  padding: 9px 14px;
  color: #FFE082;
  font-size: 12px;
  font-weight: 800;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
}
#shahsara-global-chat-wrap.sgc-dropdown-open .sgc-minimized-pill {
  display: flex;
}

/* Header Bar */
.sgc-header {
  height: 34px;
  min-height: 34px;
  background: linear-gradient(90deg, rgba(24, 58, 37, 0.95) 0%, rgba(12, 31, 20, 0.95) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  user-select: none;
}

.sgc-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #FFE082;
}

.sgc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00E676;
  box-shadow: 0 0 8px #00E676;
  animation: sgcPulse 1.6s infinite;
}

@keyframes sgcPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.65; }
}

.sgc-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: #B9F6CA;
  font-weight: 700;
}

/* Split Body: Right = Online Users, Left = Chat Stream */
.sgc-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  direction: rtl;
  min-height: 0;
  overflow: hidden;
}

/* RIGHT PANEL: Online Users (Ultra-Compact for Maximum Visible Players) */
.sgc-online-panel {
  width: 92px;
  min-width: 92px;
  background: rgba(4, 13, 8, 0.62);
  border-left: 1px solid rgba(212, 175, 55, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 640px) {
  .sgc-online-panel {
    width: 124px;
    min-width: 124px;
  }
}

.sgc-online-header {
  padding: 3px 5px;
  font-size: 8.5px;
  font-weight: 800;
  color: #FFE082;
  background: rgba(212, 175, 55, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sgc-online-count-badge {
  background: rgba(0, 230, 118, 0.18);
  color: #69F0AE;
  border: 1px solid rgba(0, 230, 118, 0.4);
  border-radius: 6px;
  padding: 0 4px;
  font-size: 8px;
  font-weight: 900;
}

.sgc-online-list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 3px;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.sgc-online-list::-webkit-scrollbar {
  width: 2.5px;
}
.sgc-online-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.sgc-online-user {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 3px;
  min-height: 19px;
  border-radius: 5px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.sgc-online-user:hover,
.sgc-online-user:active {
  background: rgba(212, 175, 55, 0.16);
  border-color: rgba(212, 175, 55, 0.38);
}

.sgc-ou-avatar-wrap {
  position: relative;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sgc-ou-avatar {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.8);
  background: #0B2215;
}

.sgc-ou-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00E676;
  border: 1px solid #06140C;
}

.sgc-ou-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.sgc-ou-name {
  font-size: 8.5px;
  font-weight: 700;
  color: #F5F5F5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.sgc-ou-lvl {
  font-size: 7px;
  color: #FFE082;
  background: rgba(212, 175, 55, 0.14);
  padding: 0 2.5px;
  border-radius: 3px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.25;
}

/* LEFT PANEL: Chat Messages + Input Bar */
.sgc-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.sgc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sgc-messages::-webkit-scrollbar {
  width: 4px;
}
.sgc-messages::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.sgc-empty {
  margin: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  padding: 12px;
}

.sgc-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 92%;
}

.sgc-msg-row.is-me {
  align-self: flex-start;
}

.sgc-msg-row.is-other {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.sgc-msg-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.7);
  background: #091E12;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.sgc-msg-avatar:hover {
  transform: scale(1.1);
}

.sgc-msg-bubble {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px 12px 12px 3px;
  padding: 4px 8px;
  min-width: 0;
  max-width: 100%;
}

.sgc-msg-row.is-me .sgc-msg-bubble {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(16, 56, 34, 0.85) 100%);
  border-color: rgba(212, 175, 55, 0.45);
  border-radius: 12px 12px 3px 12px;
}

.sgc-msg-top {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.sgc-msg-sender {
  font-size: 10px;
  font-weight: 800;
  color: #FFE082;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.sgc-msg-sender:hover {
  text-decoration: underline;
}

.sgc-msg-time {
  font-size: 8.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-right: auto;
  direction: ltr;
}

.sgc-msg-text {
  font-size: 11.5px;
  color: #FFFFFF;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.sgc-msg-gif {
  display: block;
  width: 132px;
  height: 90px;
  object-fit: contain;
  border-radius: 10px;
  margin-top: 2px;
  background: rgba(0, 0, 0, 0.25);
}

/* Input Toolbar */
.sgc-input-bar {
  height: 38px;
  min-height: 38px;
  background: rgba(4, 14, 9, 0.92);
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
}

.sgc-tool-btn {
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.1);
  color: #FFE082;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}

.sgc-tool-btn:hover,
.sgc-tool-btn.active {
  background: rgba(212, 175, 55, 0.28);
  border-color: #FFE082;
}

.sgc-input {
  flex: 1;
  min-width: 0;
  height: 28px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #FFF;
  padding: 0 9px;
  font-size: 11.5px;
  font-family: inherit;
  outline: none;
}

.sgc-input:focus {
  border-color: rgba(212, 175, 55, 0.65);
  background: rgba(0, 0, 0, 0.45);
}

.sgc-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.sgc-send-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  color: #150E00;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
  transition: transform 0.15s;
}

.sgc-send-btn:active {
  transform: scale(0.92);
}

/* Emoji & GIF Popover Panels */
.sgc-popover {
  position: absolute;
  bottom: 42px;
  right: 6px;
  left: 6px;
  max-height: 175px;
  background: linear-gradient(160deg, #0D2718 0%, #06130B 100%);
  border: 1.2px solid rgba(212, 175, 55, 0.6);
  border-radius: 14px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.85);
  z-index: 30;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.sgc-popover.open {
  display: flex;
}

.sgc-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 6px;
}

.sgc-gif-search {
  flex: 1;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(0, 0, 0, 0.4);
  color: #FFF;
  font-size: 11px;
  padding: 0 8px;
  font-family: inherit;
  outline: none;
}

.sgc-popover-close {
  background: none;
  border: none;
  color: #AAA;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
}

.sgc-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 3px;
  padding: 6px;
  overflow-y: auto;
}

.sgc-emoji-item {
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.12s;
}

.sgc-emoji-item:hover {
  background: rgba(212, 175, 55, 0.22);
  transform: scale(1.15);
}

.sgc-gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
  padding: 6px;
  overflow-y: auto;
}

.sgc-gif-item {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s, border-color 0.15s;
}

.sgc-gif-item:hover {
  transform: scale(1.04);
  border-color: #FFE082;
}

.sgc-gif-item img {
  width: 100%;
  height: 62px;
  object-fit: contain;
  border-radius: 7px;
}

/* ─── 9. User Profile Modal (From Global Chat & Online List) ─── */
.sgc-profile-card {
  max-width: 340px;
  padding: 20px 18px;
}

.sgc-prof-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 10px auto;
}

.sgc-prof-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #D4AF37;
  background: #081C10;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.sgc-prof-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00E676;
  border: 2px solid #06140C;
}

.sgc-prof-status-dot.offline {
  background: #9E9E9E;
}

.sgc-prof-name {
  font-size: 16px;
  font-weight: 900;
  color: #FFE082;
  margin: 0 0 4px 0;
}

.sgc-prof-sub {
  font-size: 11.5px;
  color: #A5D6A7;
  margin: 0 0 14px 0;
}

.sgc-prof-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.sgc-prof-stat-box {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  padding: 8px 4px;
}

.sgc-prof-stat-val {
  font-size: 14px;
  font-weight: 900;
  color: #FFE082;
  display: block;
}

.sgc-prof-stat-lbl {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
}

/* ─── 10. Room Invite Card in Global & Private Chat ───────────────────────── */
.sgc-room-invite-card {
  margin-top: 3px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18) 0%, rgba(0, 200, 83, 0.12) 100%);
  border: 1.2px solid rgba(212, 175, 55, 0.65);
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 175px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.sgc-ri-headline {
  font-size: 11px;
  font-weight: 900;
  color: #FFE082;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sgc-ri-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sgc-ri-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: #B9F6CA;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sgc-ri-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.sgc-ri-btn-join {
  flex: 1;
  background: linear-gradient(135deg, #00E676 0%, #00A152 100%);
  color: #041A0C;
  border: none;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 230, 118, 0.35);
  transition: transform 0.12s;
}

.sgc-ri-btn-join:active {
  transform: scale(0.95);
}

.sgc-ri-btn-del {
  background: rgba(239, 83, 80, 0.2);
  color: #FF8A80;
  border: 1px solid rgba(239, 83, 80, 0.45);
  border-radius: 7px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}

.sgc-ri-btn-del:hover {
  background: rgba(239, 83, 80, 0.35);
}

/* Button to share waiting room to Main Global Chat inside Invite Modal */
.shahsara-btn-post-global-chat {
  width: 100%;
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  border: 1.2px solid #FFF3C4;
  color: #1A1100;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.shahsara-btn-post-global-chat:active {
  transform: scale(0.97);
}

/* ─── 11. Mobile Keyboard VisualViewport Dock Mode ────────────────────────── */
#shahsara-global-chat-wrap.sgc-keyboard-open {
  z-index: 2147483640 !important;
  transition: none !important;
}

/* ─── 12. Rich Private Chat Overlay (Voice + Photo + Emoji/GIF) ──────────── */
#shahsara-private-chat-overlay {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  background: radial-gradient(circle at 50% 20%, #0C2919 0%, #05140B 100%);
  display: none;
  flex-direction: column;
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, Tahoma, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

#shahsara-private-chat-overlay.spc-active {
  display: flex;
}

@media (min-width: 640px) and (max-width: 1199px) {
  #shahsara-private-chat-overlay {
    right: 84px;
  }
}
@media (min-width: 1200px) {
  #shahsara-private-chat-overlay {
    right: 230px;
  }
}

.spc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spc-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.spc-msg-row.is-me {
  align-self: flex-start;
}

.spc-msg-row.is-other {
  align-self: flex-end;
}

.spc-bubble {
  padding: 8px 12px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  word-break: break-word;
}

.spc-msg-row.is-me .spc-bubble {
  background: linear-gradient(135deg, #164A2D 0%, #0D301D 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-bottom-right-radius: 4px;
  color: #FFFFFF;
}

.spc-msg-row.is-other .spc-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-left-radius: 4px;
  color: #F5F5F5;
}

.spc-msg-text {
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.spc-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  direction: ltr;
}

/* Voice Player Bubble */
.spc-voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 4px 2px;
  direction: ltr;
}

.spc-voice-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  color: #150E00;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.spc-voice-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 24px;
}

.spc-wave-bar {
  flex: 1;
  background: rgba(255, 224, 130, 0.45);
  border-radius: 2px;
  transition: height 0.15s, background 0.15s;
}

.spc-voice-player.playing .spc-wave-bar {
  background: #00E676;
  animation: spcWaveAnim 0.6s infinite ease-in-out alternate;
}

@keyframes spcWaveAnim {
  from { transform: scaleY(0.55); }
  to { transform: scaleY(1.25); }
}

.spc-voice-dur {
  font-size: 11px;
  font-weight: 700;
  color: #FFE082;
  min-width: 32px;
  text-align: right;
}

/* Image Message in Private Chat */
.spc-msg-img {
  display: block;
  max-width: 220px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

/* Private Chat Bottom Toolbar & Voice Recording Bar */
.spc-footer {
  background: rgba(5, 17, 10, 0.96);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding: 8px 10px;
  position: relative;
}

.spc-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spc-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.38);
  background: rgba(212, 175, 55, 0.12);
  color: #FFE082;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.spc-icon-btn:hover,
.spc-icon-btn:active {
  background: rgba(212, 175, 55, 0.28);
  border-color: #FFE082;
}

.spc-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #FFF;
  padding: 0 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.spc-input:focus {
  border-color: #D4AF37;
  background: rgba(0, 0, 0, 0.45);
}

.spc-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FFE082 0%, #D4AF37 100%);
  color: #150E00;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
}

/* Active Live Voice Call Bar in Private Chat */
.spc-call-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(90deg, rgba(0, 126, 51, 0.35) 0%, rgba(8, 34, 20, 0.96) 100%);
  border-bottom: 1.5px solid rgba(0, 230, 118, 0.6);
  padding: 8px 12px;
  direction: rtl;
}

.spc-call-bar.active {
  display: flex;
}

.spc-call-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #69F0AE;
}

.spc-call-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00E676;
  box-shadow: 0 0 8px #00E676;
  animation: sgcPulse 1s infinite;
}

.spc-call-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spc-call-mute-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #FFE082;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.spc-call-mute-btn.muted {
  background: rgba(239, 83, 80, 0.25);
  color: #FF8A80;
  border-color: rgba(239, 83, 80, 0.55);
}

.spc-call-end-btn {
  background: linear-gradient(135deg, #EF5350 0%, #C62828 100%);
  color: #FFF;
  border: none;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 83, 80, 0.4);
}

.spc-call-trigger-btn {
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(0, 230, 118, 0.55);
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.25) 0%, rgba(0, 126, 51, 0.35) 100%);
  color: #69F0AE;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.spc-call-trigger-btn:hover,
.spc-call-trigger-btn:active {
  background: rgba(0, 230, 118, 0.35);
  border-color: #00E676;
  color: #FFF;
}

.spc-call-trigger-btn.in-call {
  background: linear-gradient(135deg, #EF5350 0%, #C62828 100%);
  border-color: #FF8A80;
  color: #FFF;
}

/* Global Incoming Voice Call Banner */
#shahsara-call-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 92%;
  max-width: 460px;
  z-index: 2147483647;
  background: linear-gradient(135deg, rgba(8, 42, 24, 0.98) 0%, rgba(4, 18, 10, 0.99) 100%);
  border: 1.5px solid #00E676;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 230, 118, 0.35);
  padding: 12px 14px;
  direction: rtl;
  font-family: -apple-system, BlinkMacSystemFont, "Vazirmatn", "Segoe UI", Roboto, Tahoma, sans-serif;
  color: #FFF;
  box-sizing: border-box;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#shahsara-call-banner.banner-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ─── 13. Interactive Avatar & Photo Cropper Modal ────────────────────────── */
.shahsara-cropper-box {
  max-width: 380px;
  padding: 18px 16px;
}

.shahsara-crop-stage {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 10px auto 12px auto;
  border-radius: 18px;
  overflow: hidden;
  background: #030B06;
  border: 2px solid #D4AF37;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.75);
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.shahsara-crop-stage:active {
  cursor: grabbing;
}

#shahsara-crop-canvas {
  width: 260px;
  height: 260px;
  display: block;
}

.shahsara-crop-guide {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 224, 130, 0.85);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.shahsara-crop-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.shahsara-crop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #FFE082;
}

.shahsara-crop-slider {
  flex: 1;
  accent-color: #D4AF37;
  cursor: pointer;
}

.shahsara-crop-rot-btn {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #FFE082;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

/* ─── 14. Full-Screen Image Lightbox ──────────────────────────────────────── */
#shahsara-image-lightbox {
  z-index: 2147483647;
}

#shahsara-lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 14px;
  border: 2px solid #D4AF37;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9);
  object-fit: contain;
}


