/*
Template Name: WinCase CRM - Admin Dashboard
Version: 1.0.0
File: Custom CSS
*/

/* WinCase Logo */
.wincase-logo { text-decoration: none !important; letter-spacing: 1px; }
.wincase-logo-text { color: #405189; }
.wincase-logo-accent { color: #0ab39c; }

/* Dark sidebar logo */
[data-sidebar="dark-sidebar"] .wincase-logo-text,
[data-sidebar="gradient-sidebar"] .wincase-logo-text { color: #ced4da; }
[data-sidebar="dark-sidebar"] .wincase-logo-accent,
[data-sidebar="gradient-sidebar"] .wincase-logo-accent { color: #0ab39c; }

/* Dark theme - header horizontal logo */
[data-bs-theme="dark"] .app-horizontal-logo .wincase-logo-text { color: #ced4da; }
[data-bs-theme="dark"] .app-horizontal-logo .wincase-logo-accent { color: #0ab39c; }

/* ===== Mobile Sidebar ===== */
@media (max-width: 767.98px) {
  /* On mobile, sidebar is always overlaying (not pushing content) */
  .app-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px !important;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  /* When close-sidebar — keep hidden via transform */
  :root[data-main-layout=close-sidebar] .app-sidebar {
    display: block !important;
    transform: translateX(-100%);
  }

  /* When mobile-open class toggled — slide in */
  .app-sidebar.mobile-open {
    display: block !important;
    transform: translateX(0) !important;
  }

  /* Don't shift main content on mobile */
  .app-wrapper {
    margin-inline-start: 0 !important;
    width: 100% !important;
  }

  /* Don't shift header on mobile */
  .app-header {
    left: 0 !important;
    width: 100% !important;
  }

  /* Arrow icon */
  .small-screen-toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
  }
}

/* Mobile sidebar overlay */
.mobile-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}
.mobile-sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Active language dropdown item */
#language-dropdown .dropdown-item.active {
  background-color: var(--bs-primary-bg-subtle, rgba(64, 81, 137, 0.1));
  color: var(--bs-primary, #405189);
}
