@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a {
  color: var(--gp-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gp-primary-hover);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gp-primary);
}

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 270px;
  transition: margin-left var(--transition-normal);
  background-color: var(--bg-body);
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
  }
}

.content-body {
  flex: 1;
  padding: 3.25rem 2rem 3rem 2rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .content-body {
    padding: 3rem 1rem 2rem 1rem;
  }
}

/* Utility Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px var(--gp-primary-glow); }
  50% { box-shadow: 0 0 30px var(--gp-primary-glow), 0 0 45px rgba(255, 107, 0, 0.2); }
}

@keyframes livePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes rotateLoader {
  to { transform: rotate(360deg); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   GLOBAL LIGHT THEME ACCESSIBILITY & CONTRAST OVERRIDES
   ========================================================================== */
[data-theme="light"] {
  color: var(--text-main);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #0F172A !important;
}

[data-theme="light"] p,
[data-theme="light"] label {
  color: inherit;
}

/* Fix inline hardcoded light colors in light mode */
[data-theme="light"] h1[style*="color"],
[data-theme="light"] h2[style*="color"],
[data-theme="light"] h3[style*="color"],
[data-theme="light"] h4[style*="color"] {
  color: #0F172A !important;
}

/* Form inputs & controls in Light Mode */
[data-theme="light"] input[type="text"]:not(.login-control),
[data-theme="light"] input[type="password"]:not(.login-control),
[data-theme="light"] input[type="number"]:not(.login-control),
[data-theme="light"] input[type="url"]:not(.login-control),
[data-theme="light"] select:not(.login-control),
[data-theme="light"] textarea:not(.login-control),
[data-theme="light"] .form-control:not(.login-control) {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 10px !important;
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
}

#vod-search-input {
  padding-left: 3.4rem !important;
}

.login-control,
#login-user,
#login-pass {
  padding-left: 3.1rem !important;
  padding-right: 2.85rem !important;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] .form-control:focus {
  border-color: var(--gp-primary) !important;
  box-shadow: 0 0 0 3px var(--gp-primary-light) !important;
  outline: none !important;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #64748B !important;
}

/* Modals & Cards in Light Mode */
[data-theme="light"] .card,
[data-theme="light"] .modal-window,
[data-theme="light"] .modal-content,
[data-theme="light"] .table-responsive,
[data-theme="light"] .module-wrapper {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

[data-theme="light"] .modal-header {
  border-bottom-color: #E2E8F0 !important;
}

[data-theme="light"] .modal-footer {
  background-color: #F8FAFC !important;
  border-top-color: #E2E8F0 !important;
}

/* Ensure strong contrast for inline styled texts in light mode */
[data-theme="light"] b[style*="#fff"],
[data-theme="light"] b[style*="white"],
[data-theme="light"] strong[style*="#fff"],
[data-theme="light"] strong[style*="white"],
[data-theme="light"] span[style*="#fff"]:not(.badge),
[data-theme="light"] span[style*="white"]:not(.badge),
[data-theme="light"] div[style*="#fff"]:not(.progress-bar-fill),
[data-theme="light"] div[style*="white"]:not(.progress-bar-fill) {
  color: #0F172A !important;
}

[data-theme="light"] div[style*="#cbd5e1"],
[data-theme="light"] span[style*="#cbd5e1"],
[data-theme="light"] small[style*="#cbd5e1"],
[data-theme="light"] p[style*="#cbd5e1"],
[data-theme="light"] div[style*="#94a3b8"],
[data-theme="light"] span[style*="#94a3b8"],
[data-theme="light"] small[style*="#94a3b8"],
[data-theme="light"] p[style*="#94a3b8"] {
  color: #334155 !important;
}

/* Data Tables in Light Mode */
[data-theme="light"] .data-table th,
[data-theme="light"] .table th {
  background-color: #F1F5F9 !important;
  color: #334155 !important;
  border-bottom-color: #CBD5E1 !important;
}

[data-theme="light"] .data-table td,
[data-theme="light"] .table td {
  color: #0F172A !important;
  border-bottom-color: #E2E8F0 !important;
}

[data-theme="light"] .data-table tr:hover td,
[data-theme="light"] .table tr:hover td {
  background-color: #F8FAFC !important;
}
