/* Global “no new sessions” mode — paired with template vars from session_creation_gate */

.session-create-locked-ui {
  opacity: 0.48 !important;
  filter: grayscale(0.9) !important;
  cursor: not-allowed !important;
}

/* Keep maintenance stamp full-color (parent filter would gray the stamp) */
.session-maintenance-stamp.session-create-locked-ui {
  filter: none !important;
  opacity: 0.88 !important;
  cursor: not-allowed !important;
}

.session-maintenance-stamp.session-create-locked-ui .available-game-icon-img,
.session-maintenance-stamp.session-create-locked-ui .available-game-label,
.session-maintenance-stamp.session-create-locked-ui .type-icon-img {
  filter: grayscale(0.92);
  opacity: 0.42;
}

/* Diagonal «تحت الصيانة» stamp on disabled game tiles / selectors */
.session-maintenance-stamp {
  position: relative;
  overflow: hidden;
}

.session-maintenance-stamp::after {
  content: "تحت الصيانة";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  translate: -50% -50%;
  rotate: -14deg;
  padding: 0.28em 0.55em;
  max-width: 92%;
  box-sizing: border-box;
  font-family: "Tajawal", sans-serif;
  font-weight: 800;
  font-size: clamp(0.62rem, 2.8vw, 0.95rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(254, 226, 226, 0.98);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(248, 113, 113, 0.95);
  border-radius: 6px;
  background: rgba(153, 27, 27, 0.82);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Smaller stamp on create-session type tiles (narrow buttons) */
.ios-type-grid .session-maintenance-stamp::after {
  font-size: clamp(0.48rem, 2.4vw, 0.62rem);
  padding: 0.2em 0.35em;
  rotate: -11deg;
}

/* Create-session: stamp must sit above the ✓ badge; avoid native disabled (hides ::after in some UAs) */
#session-type-cards .ios-type-card.session-maintenance-stamp::after {
  z-index: 8;
}

/* Blocked game type tiles: not selectable (class-based, not [disabled]) */
/* Descendants use default pointer-events:auto and can steal hits per spec — disable subtree */
#session-type-cards .ios-type-card.session-gate-type-disabled,
#session-type-cards .ios-type-card.session-gate-type-disabled * {
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* Home «الألعاب المتوفرة»: stamp alone did not remove navigation — block clicks on locked cards */
.available-games-row a.available-game-card.session-maintenance-stamp.session-create-locked-ui,
.available-games-row a.available-game-card.session-maintenance-stamp.session-create-locked-ui * {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

.available-game-card.session-maintenance-stamp:hover {
  transform: none;
  border-color: rgba(250, 204, 21, 0.25);
  box-shadow: var(--shadow-md);
}

.session-gate-banner {
  margin-bottom: var(--spacing-lg, 1rem);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.session-gate-banner--ok {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(6, 78, 59, 0.35);
  color: #a7f3d0;
}

.session-gate-banner--info {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(120, 53, 15, 0.35);
  color: #fde68a;
}

.form-container-modern.session-gate-dim {
  position: relative;
  opacity: 0.5;
  filter: grayscale(0.35);
  pointer-events: none;
}

.form-container-modern.session-gate-dim .session-gate-banner {
  pointer-events: auto;
  opacity: 1;
  filter: none;
}
