.vs-df60d221-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 80px;
  height: 100vh;
  background-color: #1f2937;
  z-index: 9999;
  transition: width 0.3s ease;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

body.vs-df60d221-expanded .vs-df60d221-container {
  width: 250px;
}

/* The global push effect applied to the body content */
body {
  padding-left: 80px;
  transition: padding-left 0.3s ease;
}

body.vs-df60d221-expanded {
  padding-left: 250px;
}

.vs-df60d221-header {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center; /* Center hamburger when collapsed */
  position: relative;
  min-height: 80px; /* Minimum height, can grow for long titles */
}

body.vs-df60d221-expanded .vs-df60d221-header {
  justify-content: flex-end; /* Hamburger on the right when expanded */
}

/* When logo is centered, header stacks vertically */
.vs-df60d221-header:has(.vs-df60d221-logo-centered) {
  flex-direction: column;
  align-items: center;
  min-height: auto;
  padding: 15px 15px 5px;
}

body.vs-df60d221-expanded .vs-df60d221-header:has(.vs-df60d221-logo-centered) {
  justify-content: center;
}

/* Logo Area (hidden when collapsed, shows on expand) */
.vs-df60d221-logo-area {
  position: absolute;
  left: 15px;
  right: 55px; /* Leave space for the hamburger button */
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  overflow: visible; /* Allow title to be fully visible */
}

/* Centered logo layout */
.vs-df60d221-logo-area.vs-df60d221-logo-centered {
  position: relative;
  left: auto;
  right: auto;
  flex-direction: column;
  text-align: center;
  width: 100%;
  padding: 15px 10px;
}

.vs-df60d221-logo-centered .vs-df60d221-logo-img {
  margin-right: 0;
  margin-bottom: 8px;
}

.vs-df60d221-logo-centered .vs-df60d221-logo-text {
  text-align: center;
}

body.vs-df60d221-expanded .vs-df60d221-logo-area {
  opacity: 1;
  visibility: visible;
}

.vs-df60d221-logo-img {
  max-height: 40px;
  max-width: 40px;
  margin-right: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.vs-df60d221-logo-text {
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  white-space: normal; /* Allow text to wrap if it's too long */
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
  max-width: 100%;
}

.vs-df60d221-toggle {
  background: none !important;
  background-color: transparent !important;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: color 0.3s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.vs-df60d221-toggle:hover {
  color: #3b82f6;
}

.vs-df60d221-top-content {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  padding: 0 20px 20px;
  width: 250px; /* Fixed width to prevent jumping during transition */
}

body.vs-df60d221-expanded .vs-df60d221-top-content {
  opacity: 1;
  visibility: visible;
}

.vs-df60d221-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex: 1; /* Push footer to bottom */
}

.vs-df60d221-item {
  margin: 0;
}

.vs-df60d221-link {
  display: flex;
  align-items: center;
  justify-content: center; /* Center icon when collapsed */
  padding: 12px 0;
  color: #e5e7eb;
  text-decoration: none !important; /* Force remove underline */
  transition:
    background-color 0.3s,
    color 0.3s;
  min-height: 50px; /* Ensure uniform height for consistent spacing */
  box-sizing: border-box;
  border-radius: 8px;
  margin: 2px 10px;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

body.vs-df60d221-expanded .vs-df60d221-link {
  justify-content: flex-start; /* Align left when expanded */
  padding: 12px 20px;
}

.vs-df60d221-link:hover,
.vs-df60d221-link:focus,
.vs-df60d221-link:active,
.vs-df60d221-submenu-open > .vs-df60d221-link,
.vs-df60d221-link.vs-df60d221-current {
  background-color: #374151;
  color: #ffffff;
  text-decoration: none !important; /* Ensure no underline on hover */
}

.vs-df60d221-icon {
  width: 40px;
  min-width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: #9ca3af;
  flex-shrink: 0;
  transition: color 0.3s;
}

.vs-df60d221-icon svg {
  width: 20px;
  height: 20px;
  fill: #9ca3af;
  transition: fill 0.3s;
}

.vs-df60d221-text {
  opacity: 0;
  margin-left: 0; /* No margin when collapsed to keep icon centered */
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
  visibility: hidden;
  white-space: normal; /* Allow wrapping */
  line-height: 1.4;
  word-break: break-word; /* Ensure super long words break instead of overflowing */
  overflow-wrap: break-word;
  flex: 0; /* Don't take space when collapsed */
  min-width: 0; /* Prevent flex item from overflowing */
  width: 0; /* Collapse width when sidebar is collapsed */
  height: 0; /* Collapse height when sidebar is collapsed */
  overflow: hidden;
}

body.vs-df60d221-expanded .vs-df60d221-text {
  opacity: 1;
  visibility: visible;
  width: auto;
  height: auto;
  overflow: visible;
  margin-left: 10px;
  flex: 1; /* Take remaining space when expanded */
}

/* Submenu dropdown arrow */
.vs-df60d221-arrow {
  opacity: 0;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: currentColor; /* Match menu item text color */
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  flex-shrink: 0;
}

body.vs-df60d221-expanded .vs-df60d221-arrow {
  opacity: 1;
  visibility: visible;
  width: 20px;
  height: 20px;
  overflow: visible;
  margin-left: 8px;
}

.vs-df60d221-item.vs-df60d221-submenu-open
  > .vs-df60d221-link
  .vs-df60d221-arrow {
  transform: rotate(180deg);
}

/* Submenu list */
.vs-df60d221-submenu {
  list-style: none;
  padding: 0 10px;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.vs-df60d221-item.vs-df60d221-submenu-open > .vs-df60d221-submenu {
  max-height: 500px; /* Large enough to fit submenu items */
}

.vs-df60d221-submenu-item {
  margin: 0;
}

.vs-df60d221-submenu-link {
  display: block;
  padding: 10px 20px 10px 50px; /* Indent to align with parent text */
  color: #e5e7eb; /* Same as menu item text */
  text-decoration: none !important;
  font-size: 14px;
  transition:
    background-color 0.3s,
    color 0.3s;
  white-space: normal;
  word-break: break-word;
  border-radius: 8px;
  margin: 2px 0;
  background-color: transparent;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.vs-df60d221-submenu-link:visited {
  color: #e5e7eb;
  background-color: transparent;
}

.vs-df60d221-submenu-link:hover,
.vs-df60d221-submenu-link:focus,
.vs-df60d221-submenu-link.vs-df60d221-current {
  color: #e5e7eb;
  text-decoration: none !important;
}

.vs-df60d221-submenu-link:active {
  background-color: transparent;
}

/* Hide submenu entirely when sidebar is collapsed */
.vs-df60d221-submenu {
  display: none;
}

body.vs-df60d221-expanded .vs-df60d221-submenu {
  display: block;
}

/* Footer content area */
.vs-df60d221-footer-content {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  text-align: center;
}

body.vs-df60d221-expanded .vs-df60d221-footer-content {
  opacity: 1;
  visibility: visible;
}

/* Admin bar adjustment */
.admin-bar .vs-df60d221-container {
  top: 32px;
  height: calc(100vh - 32px);
}

/* Editor adjustment - disable push effect while editing */
.elementor-editor-active body {
  padding-left: 0 !important;
}
.elementor-editor-active .vs-df60d221-container {
  position: relative;
  height: auto;
  width: 100%;
}
.elementor-editor-active .vs-df60d221-top-content,
.elementor-editor-active .vs-df60d221-logo-area {
  opacity: 1;
  visibility: visible;
}

/* ===== MOBILE HEADER BAR ===== */
.vs-df60d221-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #1f2937;
  z-index: 99999;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.vs-df60d221-mobile-hamburger {
  background: none !important;
  background-color: transparent !important;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.vs-df60d221-mobile-hamburger * {
  background: none !important;
  background-color: transparent !important;
}

.vs-df60d221-mobile-hamburger svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.vs-df60d221-mobile-hamburger i {
  color: inherit;
}

.vs-df60d221-mobile-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vs-df60d221-mobile-logo img {
  max-height: 36px;
  max-width: 36px;
  object-fit: contain;
}

.vs-df60d221-mobile-logo-text {
  color: #ffffff;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.2;
}

/* Spacer for right alignment */
.vs-df60d221-mobile-spacer {
  width: 40px;
}

/* Mobile header positioning variants */
.vs-df60d221-mh-burger-right {
  flex-direction: row-reverse;
}

.vs-df60d221-mh-logo-left .vs-df60d221-mobile-logo {
  margin-right: auto;
}

.vs-df60d221-mh-logo-center .vs-df60d221-mobile-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.vs-df60d221-mh-logo-right .vs-df60d221-mobile-logo {
  margin-left: auto;
}

/* Overlay */
.vs-df60d221-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.vs-df60d221-overlay.vs-df60d221-overlay-active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== TABLET & MOBILE (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  /* Ensure Elementor wrapper doesn't interfere */
  .elementor-widget-vertical_sidebar_df60d221 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
  }

  .elementor-widget-vertical_sidebar_df60d221 .elementor-widget-container {
    overflow: visible !important;
  }

  /* Hide desktop sidebar push */
  body {
    padding-left: 0 !important;
    padding-top: 60px;
  }

  body.vs-df60d221-expanded {
    padding-left: 0 !important;
  }

  /* Show mobile header */
  .vs-df60d221-mobile-header {
    display: flex;
  }

  /* Sidebar slides in at 250px — same as desktop expanded */
  .vs-df60d221-container {
    width: 250px !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    top: 0;
    height: 100vh;
    z-index: 99999;
  }

  body.vs-df60d221-expanded .vs-df60d221-container {
    width: 250px !important;
    transform: translateX(0);
  }

  /* Show overlay */
  .vs-df60d221-overlay {
    display: block;
  }

  /* Hide the desktop toggle inside sidebar on mobile — keep it visible to close the menu */
  .vs-df60d221-toggle {
    display: flex;
  }

  /* Show logo area always when sidebar is open */
  .vs-df60d221-logo-area {
    opacity: 1;
    visibility: visible;
    position: relative;
    left: auto;
    right: auto;
  }

  /* Show text always in mobile menu */
  .vs-df60d221-text {
    opacity: 1;
    visibility: visible;
    width: auto;
    height: auto;
    overflow: visible;
    margin-left: 10px;
    flex: 1;
  }

  /* Show arrows */
  .vs-df60d221-arrow {
    opacity: 1;
    visibility: visible;
    width: 20px;
    height: 20px;
    overflow: visible;
    margin-left: 8px;
  }

  /* Show top content */
  .vs-df60d221-top-content {
    opacity: 1;
    visibility: visible;
    width: auto;
  }

  /* Show footer */
  .vs-df60d221-footer-content {
    opacity: 1;
    visibility: visible;
  }

  /* Show submenus */
  .vs-df60d221-submenu {
    display: block;
  }

  /* Menu links always left aligned */
  .vs-df60d221-link {
    justify-content: flex-start;
    padding: 12px 20px;
  }

  /* Header adjustments */
  .vs-df60d221-header {
    justify-content: flex-start;
    padding: 20px 20px 15px;
    min-height: auto;
  }
}

/* Admin bar adjustment for mobile header */
.admin-bar .vs-df60d221-mobile-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .vs-df60d221-mobile-header {
    top: 46px;
  }
}
