/* Pro mobil alt menü (menu_bar + yukarı sheet / profil) */

.ws-mm__bar-inner {
  grid-template-columns: repeat(var(--ws-mm-cols, 4), minmax(0, 1fr));
}

.ws-mm__bar-inner.ws-mm-cols-2 { --ws-mm-cols: 2; }
.ws-mm__bar-inner.ws-mm-cols-3 { --ws-mm-cols: 3; }
.ws-mm__bar-inner.ws-mm-cols-4 { --ws-mm-cols: 4; }
.ws-mm__bar-inner.ws-mm-cols-5 { --ws-mm-cols: 5; }

.ws-mm__tab {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
  padding: 0 2px;
}

.ws-mm__tab .menu_bar-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-mm__backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.35);
}

.ws-mm__backdrop:not([hidden]) {
  display: block;
}

.ws-mm__sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 70px;
  z-index: 102;
  max-height: min(58vh, 420px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgba(64, 72, 87, 0.18);
  overflow: hidden;
}

.ws-mm__sheet[hidden] {
  display: none !important;
}

.ws-mm__sheet.is-open {
  display: flex;
}

.ws-mm__sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #e9eaec;
}

.ws-mm__sheet-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.ws-mm__sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: inherit;
  cursor: pointer;
}

.ws-mm__sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 12px;
}

.ws-mm__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ws-mm__item {
  margin: 0;
}

.ws-mm__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.ws-mm__link--all {
  font-weight: 600;
  color: var(--primary, #1f1f1f);
}

.ws-mm__sub {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
  background: #fafafa;
}

.ws-mm__sub .ws-mm__link {
  padding-inline-start: 28px;
  font-weight: 400;
}

.ws-mm__item.is-expanded > .ws-mm__link--toggle i {
  transform: rotate(180deg);
}

.ws-mm__link--toggle i {
  transition: transform 0.2s ease;
}

.ws-mm__empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.ws-mm__profile-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 103;
  min-width: 180px;
  max-width: min(240px, 80vw);
  padding: 8px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(64, 72, 87, 0.2);
  transform: translateX(-50%);
}

.ws-mm__profile-menu[hidden] {
  display: none !important;
}

.ws-mm__profile-menu a,
.ws-mm__profile-menu .ws-mm__logout {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.ws-mm__profile-menu a:hover,
.ws-mm__profile-menu .ws-mm__logout:hover {
  background: #f3f4f6;
}

.ws-mm__logout {
  font-weight: 700;
  color: #b42318;
}

body.ws-mm-sheet-open {
  overflow: hidden;
}

@media (min-width: 640px) {
  .ws-mm {
    display: none !important;
  }
}
