.cbh-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  direction: rtl;
}

.cbh-exit-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cbh-exit-modal {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 60px -18px rgba(15, 23, 42, 0.45);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.24s ease;
}

.cbh-exit-overlay.open .cbh-exit-modal {
  transform: translateY(0) scale(1);
}

.cbh-exit-head {
  padding: 22px 22px 18px;
  color: #fff;
  text-align: center;
}

.cbh-theme-teacher .cbh-exit-head {
  background: linear-gradient(135deg, #312e81, #4f46e5);
}

.cbh-theme-student .cbh-exit-head {
  background: linear-gradient(135deg, #166534, #22c55e);
}

.cbh-theme-manager .cbh-exit-head {
  background: linear-gradient(135deg, #0f172a, #334155);
}

.cbh-exit-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cbh-exit-head h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
}

.cbh-exit-head p {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.88;
  line-height: 1.7;
}

.cbh-exit-body {
  padding: 18px 22px 22px;
}

.cbh-exit-msg {
  margin: 0 0 18px;
  text-align: center;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.85;
}

.cbh-exit-actions {
  display: flex;
  gap: 10px;
}

.cbh-exit-btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cbh-exit-btn:active {
  transform: scale(0.98);
}

.cbh-exit-btn-stay {
  background: #eef2ff;
  color: #4338ca;
}

.cbh-exit-btn-leave {
  color: #fff;
}

.cbh-theme-teacher .cbh-exit-btn-leave {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.cbh-theme-student .cbh-exit-btn-leave {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.cbh-theme-manager .cbh-exit-btn-leave {
  background: linear-gradient(135deg, #334155, #475569);
}
