/* One-time Telegram bot entry promo + maintenance overlay */
.welcome-modal-overlay,
.maintenance-overlay,
.testing-mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 12, 24, 0.72);
  backdrop-filter: blur(4px);
}

.welcome-modal-overlay[hidden],
.maintenance-overlay[hidden],
.testing-mode-overlay[hidden] {
  display: none !important;
}

.welcome-modal-card {
  width: 100%;
  max-width: 400px;
  max-height: min(88vh, 560px);
  overflow-y: auto;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color: #f1f5f9;
  text-align: center;
}

html[data-theme='light'] .welcome-modal-card {
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #e2e8f0;
  color: #0f172a;
}

.welcome-modal-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.welcome-modal-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.welcome-modal-testing {
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  white-space: pre-wrap;
}

html[data-theme='light'] .welcome-modal-testing {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.welcome-modal-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94a3b8;
  text-align: left;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}

html[data-theme='light'] .welcome-modal-body {
  color: #475569;
}

.welcome-modal-cta {
  width: 100%;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #e94560, #c73a52);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.welcome-modal-cta:hover {
  filter: brightness(1.08);
}

.maintenance-overlay {
  z-index: 11000;
}

.maintenance-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface, #1e293b);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  color: #f1f5f9;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.maintenance-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: #f59e0b;
}

.maintenance-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
  white-space: pre-wrap;
}

body.maintenance-active #the-whole-content {
  pointer-events: none;
  user-select: none;
  opacity: 0.35;
  filter: grayscale(0.4);
}

body.maintenance-active .ethiomark-bottom-navbar,
body.maintenance-active .top-chrome-bar {
  pointer-events: none;
}

/* Compact sticky testing-mode bar + optional full-message modal */
.testing-mode-banner {
  position: sticky;
  top: 0;
  z-index: 11000;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(90deg, #92400e 0%, #b45309 50%, #92400e 100%);
  color: #fffbeb;
  border-bottom: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.testing-mode-banner[hidden] {
  display: none !important;
}
.testing-mode-banner__inner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 720px;
  margin: 0 auto;
  padding: 0.28rem 0.55rem;
  min-height: 0;
}
.testing-mode-banner__ico {
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1;
}
.testing-mode-banner__text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.testing-mode-banner__more {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #fffbeb;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 1px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.testing-mode-banner__more:hover {
  opacity: 0.9;
}
html[data-theme='light'] .testing-mode-banner {
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
  color: #78350f;
  border-bottom-color: #f59e0b;
}
html[data-theme='light'] .testing-mode-banner__more {
  color: #92400e;
}

.testing-mode-overlay {
  z-index: 11500;
}
.testing-mode-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface, #1e293b);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 14px;
  padding: 1.35rem 1.35rem 1.15rem;
  text-align: center;
  color: #f1f5f9;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
html[data-theme='light'] .testing-mode-card {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #78350f;
}
.testing-mode-card__ico {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.55rem;
}
.testing-mode-card h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: #f59e0b;
}
html[data-theme='light'] .testing-mode-card h2 {
  color: #b45309;
}
.testing-mode-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0 0 1.1rem;
  white-space: pre-wrap;
  text-align: left;
}
html[data-theme='light'] .testing-mode-card p {
  color: #92400e;
}
.testing-mode-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: #f59e0b;
  color: #1c1917;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.testing-mode-card__cta:hover {
  filter: brightness(1.06);
}
body.testing-mode-active .profile-panel-deposit,
body.testing-mode-active .profile-panel-withdraw {
  position: relative;
}
body.testing-mode-active #profile-tab-deposit,
body.testing-mode-active [data-profile-tab="deposit"],
body.testing-mode-active [data-profile-tab="withdraw"] {
  opacity: 0.85;
}
