/* ==========================================================================
   TITANX OBS OVERLAY SUITE - STREAM STATUS / INTERMISSION WIDGET
   ========================================================================== */

.status-wrapper,
.status-widget-wrapper {
  --status-bg-color: #050510;
  --status-text-primary: #ffffff;
  --status-text-secondary: #ff007f;
  --status-accent: #00ffcc;
  --status-font-main: 'Orbitron', sans-serif;
  --status-font-sub: 'Inter', sans-serif;
}

.status-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
  overflow: hidden;
  box-sizing: border-box;
}

body:not(.view-status):not(.is-standalone-status) #status-wrapper,
body:not(.view-status):not(.is-standalone-status) .status-wrapper {
  display: none !important;
}

.status-stage-scaler {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.status-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-motion-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.status-widget-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--status-font-main);
  box-sizing: border-box;
}

.status-widget-wrapper.layout-full {
  width: 100%;
  height: 100%;
}

.status-widget-wrapper.layout-compact {
  max-width: 680px;
  width: auto;
  height: auto;
}

.status-background {
  position: absolute;
  inset: 0;
  background-color: var(--status-bg-color);
  background-size: cover;
  background-position: center;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* In editor preview mode, let test background sit cleanly behind the scene when no custom image or video is active */
body:not(.is-overlay):not(.is-standalone-status) .status-background:not([style*="background-image"]):not(.has-custom-image):not(.has-custom-video) {
  background-color: transparent;
}

/* Background Layers Order:
   1. Media layer (Image: .status-bg-image-layer, Video: .status-bg-video-layer) - z-index: 1
   2. Dark overlay (.status-bg-dark-overlay) - z-index: 2
   3. Tint layer (.status-bg-tint-overlay) - z-index: 3
   4. Vignette layer (.status-bg-vignette-overlay) - z-index: 4
*/
.status-bg-image-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-repeat: no-repeat;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity, filter;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.status-bg-video-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity, filter;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.status-bg-dark-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: #000000;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.status-bg-tint-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.status-bg-vignette-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.status-bg-fx-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.15s ease;
}

.status-bg-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.status-content-scale-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  max-width: 90%;
  pointer-events: auto;
  transition: transform 0.15s ease-out;
}

.status-internal-animation-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  width: 100%;
}

.status-content {
  position: relative;
  z-index: 10;
  padding: 40px 60px;
  background: var(--status-content-bg, rgba(0, 0, 0, 0.45));
  border: 2px solid var(--status-border-color, var(--status-accent));
  border-radius: 16px;
  box-shadow: 0 0 30px var(--status-scene-glow, rgba(0, 255, 204, 0.2));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Stream Status Logo */
.status-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
  pointer-events: none;
  line-height: 0;
  transition: opacity 0.15s ease, margin 0.15s ease;
}

.status-logo-img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.layout-compact .status-logo-container {
  /* Inherits flex styling naturally */
}

/* Continuous Internal Animations */
@keyframes statusInternalSoftPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(var(--internal-pulse-scale, 1.025));
  }
}

.status-internal-soft-pulse {
  animation: statusInternalSoftPulse var(--internal-anim-dur, 2.5s) ease-in-out infinite !important;
  transform-origin: center center;
}

@keyframes statusInternalFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(var(--internal-float-y, -10px));
  }
}

.status-internal-float {
  animation: statusInternalFloat var(--internal-anim-dur, 3s) ease-in-out infinite !important;
  transform-origin: center center;
}

@keyframes statusInternalGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 var(--internal-glow-min, 3px) var(--internal-glow-color, rgba(0, 255, 204, 0.4)));
  }
  50% {
    filter: drop-shadow(0 0 var(--internal-glow-max, 16px) var(--internal-glow-color, rgba(0, 255, 204, 0.85)));
  }
}

.status-internal-glow-pulse {
  animation: statusInternalGlowPulse var(--internal-anim-dur, 2s) ease-in-out infinite !important;
}

@keyframes statusInternalShimmer {
  0% {
    transform: translateX(-150%);
  }
  100% {
    transform: translateX(150%);
  }
}

.status-shimmer-active {
  position: relative;
  overflow: hidden;
}

.status-shimmer-active::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255, 255, 255, var(--internal-shimmer-opacity, 0.35)) 50%,
    transparent 75%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  animation: statusInternalShimmer var(--internal-anim-dur, 3s) ease-in-out infinite;
}

.layout-compact .status-content {
  padding: 24px 36px;
}

.status-title {
  font-size: 56px;
  font-weight: 700;
  color: var(--status-text-primary);
  text-shadow: 0 0 20px var(--status-accent);
  margin-bottom: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.layout-compact .status-title {
  font-size: 36px;
  margin-bottom: 8px;
}

.status-subtitle {
  font-family: var(--status-font-sub);
  font-size: 22px;
  color: var(--status-text-secondary);
  margin-bottom: 20px;
}

.layout-compact .status-subtitle {
  font-size: 16px;
  margin-bottom: 14px;
}

.status-datetime-container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.status-date,
.status-time {
  font-family: var(--status-font-sub);
  font-size: 20px;
  font-weight: 600;
  color: var(--status-accent);
  letter-spacing: 1px;
}

.status-primary-message {
  font-family: var(--status-font-main);
  font-size: 24px;
  font-weight: 600;
  color: var(--status-text-primary);
  margin-bottom: 16px;
  max-width: 800px;
  line-height: 1.4;
}

.status-timer-container {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.status-timer-label {
  font-family: var(--status-font-sub);
  font-size: 16px;
  font-weight: 700;
  color: var(--status-text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.status-timer {
  font-size: 72px;
  font-weight: 700;
  color: var(--status-accent);
  text-shadow: 0 0 15px var(--status-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  line-height: 1;
}

.layout-compact .status-timer {
  font-size: 48px;
}

.status-message {
  font-family: var(--status-font-sub);
  font-size: 18px;
  color: var(--status-text-primary);
  margin-top: 16px;
  max-width: 650px;
  line-height: 1.5;
}

.layout-compact .status-message {
  font-size: 14px;
  margin-top: 12px;
}

.status-meta-container {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

.status-social,
.status-website {
  font-family: var(--status-font-sub);
  font-size: 16px;
  font-weight: 600;
  color: var(--status-text-secondary);
  letter-spacing: 1px;
}

.status-footer {
  font-family: var(--status-font-sub);
  font-size: 14px;
  font-weight: 600;
  color: var(--status-text-secondary);
  opacity: 0.85;
  margin-top: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.status-schedule-label {
  font-family: var(--status-font-sub);
  font-size: 16px;
  font-weight: 700;
  color: var(--status-text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Order adjustments per screen mode */
.status-widget-wrapper.mode-starting .status-title { order: 1; }
.status-widget-wrapper.mode-starting .status-subtitle { order: 2; }
.status-widget-wrapper.mode-starting .status-datetime-container { order: 3; }
.status-widget-wrapper.mode-starting .status-primary-message { order: 4; }
.status-widget-wrapper.mode-starting .status-timer-container { order: 5; }
.status-widget-wrapper.mode-starting .status-message { order: 6; }
.status-widget-wrapper.mode-starting .status-meta-container { order: 7; }
.status-widget-wrapper.mode-starting .status-footer { order: 8; }

.status-widget-wrapper.mode-break .status-title { order: 1; }
.status-widget-wrapper.mode-break .status-subtitle { order: 2; }
.status-widget-wrapper.mode-break .status-timer-container { order: 3; }
.status-widget-wrapper.mode-break .status-primary-message { order: 4; }
.status-widget-wrapper.mode-break .status-message { order: 5; }
.status-widget-wrapper.mode-break .status-meta-container { order: 6; }
.status-widget-wrapper.mode-break .status-footer { order: 7; }

.status-widget-wrapper.mode-offline .status-title { order: 1; }
.status-widget-wrapper.mode-offline .status-primary-message { order: 2; }
.status-widget-wrapper.mode-offline .status-subtitle { order: 3; }
.status-widget-wrapper.mode-offline .status-datetime-container { order: 4; }
.status-widget-wrapper.mode-offline .status-meta-container { order: 5; }
.status-widget-wrapper.mode-offline .status-footer { order: 6; }

/* Ensure completely collapsed elements leave zero space */
.status-content > [style*="display: none"],
.status-content > div[style*="display: none"],
.status-content > span[style*="display: none"] {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}

/* Animations */
@keyframes statusPulseGlow {
  0% { box-shadow: 0 0 20px rgba(0, 255, 204, 0.2); }
  50% { box-shadow: 0 0 50px rgba(0, 255, 204, 0.6); }
  100% { box-shadow: 0 0 20px rgba(0, 255, 204, 0.2); }
}

.status-content.status-pulse {
  animation: statusPulseGlow 2s infinite ease-in-out;
}

/* Themes */
.status-widget-wrapper.theme-cyberpunk {
  --status-bg-color: #050510;
  --status-text-primary: #ffffff;
  --status-text-secondary: #ff007f;
  --status-accent: #00ffcc;
  --status-font-main: 'Orbitron', sans-serif;
}

.status-widget-wrapper.theme-esports {
  --status-bg-color: #0b0e14;
  --status-text-primary: #fef08a;
  --status-text-secondary: #ffffff;
  --status-accent: #eab308;
  --status-font-main: 'Rajdhani', sans-serif;
}

.status-widget-wrapper.theme-minimal,
.status-widget-wrapper.theme-minimal-dark {
  --status-bg-color: #0f172a;
  --status-text-primary: #ffffff;
  --status-text-secondary: #94a3b8;
  --status-accent: #38bdf8;
  --status-font-main: 'Inter', sans-serif;
}
.status-widget-wrapper.theme-minimal .status-content,
.status-widget-wrapper.theme-minimal-dark .status-content {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: none;
}

.status-widget-wrapper.theme-minimal-light {
  --status-bg-color: #f1f5f9;
  --status-text-primary: #0f172a;
  --status-text-secondary: #475569;
  --status-accent: #2563eb;
  --status-font-main: 'Inter', sans-serif;
}
.status-widget-wrapper.theme-minimal-light .status-content {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
}
.status-widget-wrapper.theme-minimal-light .status-title {
  color: #0f172a;
  text-shadow: none;
}
.status-widget-wrapper.theme-minimal-light .status-subtitle {
  color: #475569;
}
.status-widget-wrapper.theme-minimal-light .status-timer {
  color: #2563eb;
  text-shadow: none;
}
.status-widget-wrapper.theme-minimal-light .status-message {
  color: #334155;
}

.status-widget-wrapper.theme-glass {
  --status-bg-color: #0f172a;
  --status-text-primary: #ffffff;
  --status-text-secondary: #bae6fd;
  --status-accent: #38bdf8;
  --status-font-main: 'Montserrat', sans-serif;
}
.status-widget-wrapper.theme-glass .status-content {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.status-widget-wrapper.theme-red-alert {
  --status-bg-color: #140303;
  --status-text-primary: #ffffff;
  --status-text-secondary: #fca5a5;
  --status-accent: #ef4444;
  --status-font-main: 'Bebas Neue', sans-serif;
}

.status-widget-wrapper.theme-devotional {
  --status-bg-color: #1a0a00;
  --status-text-primary: #fef9c3;
  --status-text-secondary: #fed7aa;
  --status-accent: #f97316;
  --status-font-main: 'Outfit', sans-serif;
}

.status-widget-wrapper.theme-golden,
.status-widget-wrapper.theme-golden-luxe {
  --status-bg-color: #140d02;
  --status-text-primary: #fef9c3;
  --status-text-secondary: #fde047;
  --status-accent: #eab308;
  --status-font-main: 'Outfit', sans-serif;
}

.status-widget-wrapper.theme-clean-broadcast,
.status-widget-wrapper.theme-broadcast {
  --status-bg-color: #090d14;
  --status-text-primary: #ffffff;
  --status-text-secondary: #94a3b8;
  --status-accent: #0284c7;
  --status-font-main: 'Rajdhani', sans-serif;
}
.status-widget-wrapper.theme-clean-broadcast .status-content,
.status-widget-wrapper.theme-broadcast .status-content {
  background: rgba(13, 19, 30, 0.92);
  border-top: 4px solid #0284c7;
  border-bottom: 2px solid rgba(2, 132, 199, 0.4);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
}
.status-widget-wrapper.theme-clean-broadcast .status-title,
.status-widget-wrapper.theme-broadcast .status-title {
  color: #ffffff;
  letter-spacing: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.status-widget-wrapper.theme-clean-broadcast .status-subtitle,
.status-widget-wrapper.theme-broadcast .status-subtitle {
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.status-widget-wrapper.theme-clean-broadcast .status-timer,
.status-widget-wrapper.theme-broadcast .status-timer {
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  letter-spacing: 3px;
}
.status-widget-wrapper.theme-clean-broadcast .status-message,
.status-widget-wrapper.theme-broadcast .status-message {
  color: #cbd5e1;
}

.status-widget-wrapper.theme-neon-gaming,
.status-widget-wrapper.theme-gaming-neon {
  --status-bg-color: #090314;
  --status-text-primary: #ffffff;
  --status-text-secondary: #38bdf8;
  --status-accent: #a855f7;
  --status-font-main: 'Orbitron', sans-serif;
}
.status-widget-wrapper.theme-neon-gaming .status-content,
.status-widget-wrapper.theme-gaming-neon .status-content {
  background: rgba(18, 8, 38, 0.85);
  border: 2px solid #a855f7;
  border-radius: 16px;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.35), inset 0 0 20px rgba(6, 182, 212, 0.2);
}
.status-widget-wrapper.theme-neon-gaming .status-title,
.status-widget-wrapper.theme-gaming-neon .status-title {
  color: #ffffff;
  text-shadow: 0 0 15px #a855f7, 0 0 30px rgba(168, 85, 247, 0.6);
  letter-spacing: 4px;
}
.status-widget-wrapper.theme-neon-gaming .status-subtitle,
.status-widget-wrapper.theme-gaming-neon .status-subtitle {
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}
.status-widget-wrapper.theme-neon-gaming .status-timer,
.status-widget-wrapper.theme-gaming-neon .status-timer {
  color: #06b6d4;
  text-shadow: 0 0 20px #06b6d4, 0 0 35px rgba(168, 85, 247, 0.7);
  letter-spacing: 3px;
}
.status-widget-wrapper.theme-neon-gaming .status-message,
.status-widget-wrapper.theme-gaming-neon .status-message {
  color: #e9d5ff;
}

/* Standalone Page Only */
body.is-standalone-status {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

body.is-standalone-status .status-stage-scaler {
  width: 100vw;
  height: 100vh;
}
