/* RTL enforced; right-side slide-in */
html.kam3-locked,
body.kam3-locked {
  overflow: hidden;
}

.kam3-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 9998;
}
.kam3-overlay.is-open{ opacity: 1; pointer-events: auto; }

.kam3-wrap{
  position: fixed; top: 0; bottom: 0; right: 0;
  width: calc(280px * var(--kam3-columns, 3));
  max-width: 100vw;
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 9999;
  display: flex; align-items: stretch;
  direction: rtl;
  font-family: inherit;
}
.kam3-wrap--anchored{
  bottom: auto;
  height: auto;
}
.kam3-wrap.is-open{ transform: translateX(0); }

.kam3-host-container{ position: relative; }
.kam3-overlay.kam3-hosted{
  position: fixed;
  inset: 0;
}
.kam3-overlay--anchored{
  bottom: auto;
  height: auto;
}
.kam3-wrap.kam3-hosted{
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
}
.kam3-wrap.kam3-hosted.kam3-wrap--anchored{
  bottom: auto;
}

.kam3-panels{
  display: flex;
  margin-left: auto;
  height: 100%;
  position: relative;
  flex: 1;
  min-height: 0;
}
.kam3-panel{
  width: 280px; height: 100%;
  background: #111; color: #fff;
  border-left: 1px solid rgba(255,255,255,.08);
  display: none; flex-direction: column;
  box-shadow: 0 20px 40px -16px rgba(0,0,0,0.45);
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.kam3-panel.is-active{ display: flex; }
.kam3-panel header{ display: none; }

.kam3-close-panel{
  position: absolute;
  top: 24px;
  left: -16px;
  transform: translateX(-100%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  padding: 0;
}
.kam3-close-panel-icon{
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
.kam3-wrap.is-open .kam3-panel.is-active > .kam3-close-panel[aria-hidden="false"]{
  opacity: 1;
  pointer-events: auto;
}
.kam3-wrap.is-open .kam3-panel.is-active > .kam3-close-panel[aria-hidden="true"]{
  opacity: 0;
  pointer-events: none;
}
.kam3-close-panel:hover,
.kam3-close-panel:focus{
  background: rgba(0,0,0,0.65);
  outline: none;
}

.kam3-scroll{
  overflow: auto; -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 8px 6px;
  overscroll-behavior: contain;
  min-height: 0;
}

.kam3-item{
  display:flex; align-items:center; justify-content: space-between;
  text-decoration: none; color: #eaeaea;
  padding: 6px 12px; border-radius: 8px;
  margin: 4px 2px;
  background: #1a1a1a;
}
.kam3-label{
  display: flex;
  align-items: center;
  gap: 12px;
}
.kam3-icon{
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.kam3-icon img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.kam3-icon i{
  font-size: 20px;
  line-height: 1;
  color: inherit;
}
.kam3-item:hover,
.kam3-item.is-active{ background: #EBEBEB; color: var(--kaman-color-text, #121212); }
.kam3-item.is-active .kam3-title{ color: inherit; }
.kam3-title{ font-size: 14px; line-height: 1.3; }
.kam3-caret{
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kam3-badge{
  font-size: 14px;
  background: #3a3a3a;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.kam3-caret i,
.kam3-badge i{
  line-height: 1;
  color: inherit;
}

.level-2, .level-3{ opacity: 0.6; }
.level-2.is-active, .level-3.is-active{ opacity: 1; }

.kam3-content{ padding: 8px; background: #101010; }
.kam3-loading, .kam3-empty{
  padding: 16px; text-align: center; color: #bbb; font-size: 14px;
}

.kam3-parent-icon{
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
}
.kam3-parent-icon img{
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.kam3-parent-icon i{
  font-size: 24px;
  color: inherit;
}

/* Scrollbar (WebKit) */
.kam3-scroll::-webkit-scrollbar{ width: 10px; }
.kam3-scroll::-webkit-scrollbar-track{ background: #0f0f0f; border-radius: 8px; }
.kam3-scroll::-webkit-scrollbar-thumb{ background: #2a2a2a; border-radius: 8px; }
.kam3-scroll::-webkit-scrollbar-thumb:hover{ background: #3a3a3a; }

/* Responsive: collapse columns on small screens */
@media (max-width: 839px){
  .kam3-wrap{ width: min(calc(280px * var(--kam3-columns, 3)), calc(280px * 2)); }
}
@media (max-width: 559px){
  .kam3-wrap{ width: min(calc(280px * var(--kam3-columns, 3)), 280px); }
}

.kam3-wrap .level-2 .kam3-item {
    padding: 12px 12px;
}
.kam3-wrap .level-1 .kam3-item:hover .kam3-title, .kam3-wrap .level-1 .kam3-item.is-active .kam3-title {
    font-size: 15px;
    font-weight: 500;
}
.kam3-wrap .level-2 .kam3-item:hover .kam3-title, .kam3-wrap .level-2 .kam3-item.is-active .kam3-title {
    font-weight: 500;
}