/* --- Button Styles (Preserved & Cleaned) --- */
.haika-menu-container {
  display: inline-block;
  /* position: relative; has been removed to avoid z-index stacking issues */
}

.haika-menu-btn {
  background: #ff8c00;
  color: white;
  padding: 12px 18px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative; /* Ensures the button can have a z-index */
  z-index: 39; /* Places the button just below the sidebar (which is z-40) */
}

.haika-menu-btn:hover {
  background: #e67e00;
  transform: scale(1.02);
}

.haika-menu-btn .menu-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Icon Sizing from Admin Panel */
.haika-menu-btn[data-icon-size="16"] .menu-icon { width: 16px; height: 16px; }
.haika-menu-btn[data-icon-size="18"] .menu-icon { width: 18px; height: 18px; }
.haika-menu-btn[data-icon-size="20"] .menu-icon { width: 20px; height: 20px; }
.haika-menu-btn[data-icon-size="22"] .menu-icon { width: 22px; height: 22px; }
.haika-menu-btn[data-icon-size="24"] .menu-icon { width: 24px; height: 24px; }
.haika-menu-btn[data-icon-size="26"] .menu-icon { width: 26px; height: 26px; }
.haika-menu-btn[data-icon-size="28"] .menu-icon { width: 28px; height: 28px; }
.haika-menu-btn[data-icon-size="30"] .menu-icon { width: 30px; height: 30px; }
.haika-menu-btn[data-icon-size="32"] .menu-icon { width: 32px; height: 32px; }
.haika-menu-btn[data-icon-size="34"] .menu-icon { width: 34px; height: 34px; }
.haika-menu-btn[data-icon-size="36"] .menu-icon { width: 36px; height: 36px; }
.haika-menu-btn[data-icon-size="38"] .menu-icon { width: 38px; height: 38px; }
.haika-menu-btn[data-icon-size="40"] .menu-icon { width: 40px; height: 40px; }
.haika-menu-btn[data-icon-size="42"] .menu-icon { width: 42px; height: 42px; }
.haika-menu-btn[data-icon-size="44"] .menu-icon { width: 44px; height: 44px; }
.haika-menu-btn[data-icon-size="46"] .menu-icon { width: 46px; height: 46px; }
.haika-menu-btn[data-icon-size="48"] .menu-icon { width: 48px; height: 48px; }
.haika-menu-btn[data-icon-size="50"] .menu-icon { width: 50px; height: 50px; }

/* Icon Only State */
.haika-menu-btn.icon-only {
  padding: 12px;
  min-width: 44px;
  justify-content: center;
  background: transparent !important;
  border: none;
}

.haika-menu-btn.icon-only:hover {
  background: rgba(0,0,0,0.1) !important;
  transform: scale(1.05);
}

/* --- Sidebar Menu Styles (from menu.html) --- */
#sidebar {
    direction: rtl;
}

.group:hover .group-hover\:flex {
    display: flex;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slideIn {
    animation: slideIn 0.3s ease-out;
}

.level2-box {
    width: var(--haika-box-width);
    background-color: var(--haika-lvl2-bg);
    clip-path: polygon(
        0% var(--haika-top-offset),
        var(--haika-step-width) var(--haika-top-offset),
        var(--haika-step-width) calc(var(--haika-top-offset) - var(--haika-step-height)),
        100% calc(var(--haika-top-offset) - var(--haika-step-height) + var(--haika-slope-height)),
        100% 100%,
        0% 100%
    );
}

/* General text color */
#sidebar, .level2-box, .level3-submenu {
    color: var(--haika-text-color);
}

/* Link colors */
#sidebar a,
.level2-box a,
.level3-submenu a {
    color: var(--haika-text-color);
    transition: color 0.3s ease;
}

#sidebar a:hover,
.level2-box a:hover,
.level3-submenu a:hover,
.level3-parent:hover .level3-toggle {
    color: var(--haika-text-hover-color);
    opacity: 1; /* Override existing opacity hover */
}

/* Specific hover overrides for elements without <a> */
.level3-toggle:hover {
    color: var(--haika-text-hover-color);
}

/* Hide scrollbar */
.overflow-y-auto::-webkit-scrollbar {
  display: none;
}
.overflow-y-auto {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
