/* bunkering.ai — HUD integration helpers
   Compatibility styles for legacy pages that still use the old custom class names
   (panel, notice, pill, etc.).
*/

/* Prevent older layouts from clamping width */
.container { max-width: none !important; }

/* Legacy panel -> HUD-ish card */
.panel {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  background: rgba(0,0,0,0.18);
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
}

.panel-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.panel-header h2 { margin: 0; font-size: 0.95rem; }
.panel-header p { margin: 0.25rem 0 0; opacity: 0.75; font-size: 0.85rem; }

.panel-body { padding: 1rem; }

.notice {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255,255,255,0.05);
  opacity: 0.9;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  font-size: 0.85rem;
}

/* Legacy buttons */
.btn.primary,
button.primary {
  background: rgba(0,172,172,0.18);
  border-color: rgba(0,172,172,0.45);
  color: #eaffff;
}

.btn.danger,
button.danger {
  background: rgba(220,53,69,0.18);
  border-color: rgba(220,53,69,0.45);
  color: #ffecec;
}

/* Tables */
table.table {
  border-radius: 0.9rem;
  overflow: hidden;
}

/* Legacy status badges */
.badge.new { background: rgba(0,172,172,0.20) !important; border-color: rgba(0,172,172,0.45) !important; }
.badge.quoted { background: rgba(255,193,7,0.18) !important; border-color: rgba(255,193,7,0.40) !important; }
.badge.accepted { background: rgba(25,135,84,0.18) !important; border-color: rgba(25,135,84,0.40) !important; }
.badge.rejected { background: rgba(220,53,69,0.18) !important; border-color: rgba(220,53,69,0.40) !important; }

/* Two-column helper */
.grid2 { display: grid; grid-template-columns: 420px 1fr; gap: 1rem; }
@media (max-width: 980px) { .grid2 { grid-template-columns: 1fr; } }

/* Ensure old toasts don't hide behind HUD elements */
.toast { z-index: 2000 !important; }

/* AI Intake page helpers */
.ai-chat-stream { min-height: 55vh; }

/* =========================================================
   Login video background (login page only)
   index.php sets: $body_class = 'login-video'
   ========================================================= */
body.login-video {
  background: #0b1220 !important;
}

body.login-video #loginVideoBg {
  position: fixed !important;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
}

body.login-video #loginVideoOverlay {
  position: fixed !important;
  inset: 0;
  background: rgba(7, 10, 18, 0.70);
  z-index: 1;
  pointer-events: none;
}

body.login-video #app,
body.login-video #content,
body.login-video .app-content,
body.login-video .login {
  position: relative;
  z-index: 2;
  background: transparent !important;
}
.ai-chat-bubble { white-space: pre-wrap; }

/* === bunkering.ai HUD header alignment hardening === */
/* If legacy CSS touches header, force HUD header/menu alignment */
#header.app-header { display: flex; align-items: center; }
#header.app-header .menu { margin-left: auto; display: flex; align-items: center; }
/* keep brand from shrinking too much */
#header.app-header .brand { flex: 0 0 auto; }


/* =========================================================
   Login page: additional green tint overlay + role toggle
   ========================================================= */

/* Green tint overlay above the background/video (requested #3cd2a5 @ 0.40) */
body.login-video #loginTintOverlay{
  position: fixed !important;
  inset: 0;
  background: rgba(30, 41, 54, 0.40);
  z-index: 2; /* above #loginVideoOverlay (z=1), below login (z=3) */
  pointer-events: none;
}

/* Keep login UI above overlays even if inline styles set z-index:2 */
body.login-video .login { z-index: 3 !important; }
body.login-video .login-content { position: relative; z-index: 3 !important; }

/* Visual cue: active login role button */
.login .btn-outline-theme.active{
  background: rgba(60, 210, 165, 0.22);
  border-color: rgba(60, 210, 165, 0.75);
  box-shadow: 0 0 0 .15rem rgba(60, 210, 165, 0.18);
}

/* Slightly improve input contrast on video background */
.login .form-control.bg-inverse.bg-opacity-5{
  background-color: rgba(0,0,0,0.28) !important;
  border-color: rgba(255,255,255,0.14);
}
.login .form-control.bg-inverse.bg-opacity-5:focus{
  border-color: rgba(60, 210, 165, 0.65);
  box-shadow: 0 0 0 .15rem rgba(60, 210, 165, 0.18);
}


/* === Force login tint overlay (works with or without body.login-video) === */
#loginTintOverlay{
  position: fixed !important;
  inset: 0;
  background: rgba(30, 41, 54, 0.75) !important;
  z-index: 2; /* above loginVideoOverlay (z=1), below login (z>=3) */
  pointer-events: none;
}

/* Ensure login content sits above overlays */
.login{ position: relative; z-index: 3; }
.login .login-content{ position: relative; z-index: 3; }
