/* TrainCenter — شاشة تحميل موحّدة (شعار + حلقة دوّارة) */
:root {
  --tc-load-brand: #005b6f;
  --tc-load-brand-light: #0a7a94;
  --tc-load-ring-track: #e8f0f2;
  --tc-load-text: #334155;
  --tc-load-muted: #64748b;
  --tc-load-bg: #f8fafb;
}

.tc-load {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.tc-load__ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tc-load--md .tc-load__ring {
  width: 132px;
  height: 132px;
}

.tc-load--sm .tc-load__ring {
  width: 96px;
  height: 96px;
}

.tc-load__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--tc-load-ring-track);
  border-top-color: var(--tc-load-brand);
  border-right-color: var(--tc-load-brand-light);
  animation: tc-load-spin 0.85s linear infinite;
}

.tc-load__ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 91, 111, 0.08);
}

.tc-load--md .tc-load__ring::after {
  inset: 10px;
}

.tc-load--sm .tc-load__ring::after {
  inset: 8px;
}

.tc-load__logo {
  position: relative;
  z-index: 1;
  width: auto;
  object-fit: contain;
}

.tc-load--md .tc-load__logo {
  width: 72px;
  max-height: 72px;
}

.tc-load--sm .tc-load__logo {
  width: 52px;
  max-height: 52px;
}

.tc-load__msg {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tc-load-text);
  font-weight: 500;
}

.tc-load__link {
  font-size: 0.875rem;
  color: var(--tc-load-brand);
  text-decoration: none;
}

.tc-load__link:hover {
  text-decoration: underline;
}

/* صفحة تحويل/تحميل كاملة */
.tc-load-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--tc-load-bg);
  color: var(--tc-load-text);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* طبقة فوق الصفحة أثناء التنقل — الشعار والنص بدون بطاقة بيضاء */
.tc-page-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(248, 250, 251, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.tc-page-loader .tc-load__ring::after {
  display: none;
}

.tc-page-loader .tc-load__msg {
  font-weight: 600;
  text-shadow:
    0 1px 12px rgba(255, 255, 255, 0.98),
    0 0 3px rgba(255, 255, 255, 0.85);
}

.tc-page-loader.is-active,
html.tc-is-loading .tc-page-loader {
  display: flex;
}

html:has(.tc-page-loader.is-active),
html.tc-is-loading:has(.tc-page-loader.is-active) {
  overflow: hidden;
}

html:has(.tc-page-loader.is-active) body,
html.tc-is-loading:has(.tc-page-loader.is-active) body {
  overflow: hidden;
}

@keyframes tc-load-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-load__ring::before {
    animation: none;
    border-color: var(--tc-load-brand);
  }
}
