.webs-mvc,
.webs-mvc * {
    box-sizing: border-box;
}

.webs-mvc {
    --webs-mvc-accent: #1769e0;
    --webs-mvc-bg: #ffffff;
    --webs-mvc-text: #202631;
    --webs-mvc-muted: #667085;
    --webs-mvc-border: #e4e8ee;
    --webs-mvc-hover: #f5f8ff;
    --webs-mvc-radius: 14px;
    width: 100%;
    max-width: 430px;
    overflow: hidden;
    color: var(--webs-mvc-text);
    background: var(--webs-mvc-bg);
    border: 1px solid var(--webs-mvc-border);
    border-radius: var(--webs-mvc-radius);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
    font-family: inherit;
}

.webs-mvc__header {
    padding: 18px;
    border-bottom: 1px solid var(--webs-mvc-border);
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.78));
}

.webs-mvc__title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.webs-mvc__title-wrap:last-child {
    margin-bottom: 0;
}

.webs-mvc__title-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: #fff;
    background: var(--webs-mvc-accent);
    border-radius: 10px;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--webs-mvc-accent) 26%, transparent);
}

.webs-mvc__title-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.webs-mvc__title {
    margin: 0;
    color: var(--webs-mvc-text);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.webs-mvc__search {
    position: relative;
    display: block;
}

.webs-mvc__search-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--webs-mvc-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.webs-mvc__search-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.webs-mvc__search-input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 40px 0 40px;
    color: var(--webs-mvc-text);
    background: #fff;
    border: 1px solid var(--webs-mvc-border);
    border-radius: 10px;
    outline: none;
    box-shadow: none;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.webs-mvc__search-input:focus {
    border-color: var(--webs-mvc-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--webs-mvc-accent) 14%, transparent);
}

.webs-mvc__search-input::placeholder {
    color: color-mix(in srgb, var(--webs-mvc-muted) 78%, white);
}

.webs-mvc__search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--webs-mvc-muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.webs-mvc__search-clear:hover,
.webs-mvc__search-clear:focus-visible {
    color: var(--webs-mvc-text);
    background: var(--webs-mvc-hover);
    outline: none;
}

.webs-mvc__body {
    max-height: 70vh;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--webs-mvc-border) transparent;
}

.webs-mvc__body::-webkit-scrollbar {
    width: 8px;
}

.webs-mvc__body::-webkit-scrollbar-thumb {
    background: var(--webs-mvc-border);
    border: 2px solid var(--webs-mvc-bg);
    border-radius: 999px;
}

.webs-mvc__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.webs-mvc__list--root {
    padding: 8px;
}

.webs-mvc__item {
    margin: 0;
    padding: 0;
}

.webs-mvc__row {
    position: relative;
    display: flex;
    align-items: stretch;
    min-width: 0;
    border-radius: 10px;
    transition: background-color .18s ease;
}

.webs-mvc__row:hover,
.webs-mvc__item.is-current-path > .webs-mvc__row {
    background: var(--webs-mvc-hover);
}

.webs-mvc__item.is-current-path > .webs-mvc__row::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 3px;
    content: "";
    background: var(--webs-mvc-accent);
    border-radius: 999px;
}

.webs-mvc__link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex: 1 1 auto;
    padding: 10px 8px 10px 10px;
    color: var(--webs-mvc-text);
    text-decoration: none !important;
    border: 0;
    outline: none;
    box-shadow: none !important;
}

.webs-mvc__link:focus-visible {
    border-radius: 8px;
    outline: 2px solid var(--webs-mvc-accent);
    outline-offset: -2px;
}

.webs-mvc__thumb {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    object-fit: cover;
    color: var(--webs-mvc-accent);
    background: color-mix(in srgb, var(--webs-mvc-accent) 9%, white);
    border: 1px solid color-mix(in srgb, var(--webs-mvc-accent) 14%, var(--webs-mvc-border));
    border-radius: 10px;
}

.webs-mvc__thumb--small {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
}

.webs-mvc__thumb--placeholder svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.webs-mvc__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    margin-left: 5px;
    background: color-mix(in srgb, var(--webs-mvc-accent) 44%, white);
    border-radius: 50%;
}

.webs-mvc__name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webs-mvc__item--depth-1 .webs-mvc__name,
.webs-mvc__item--depth-2 .webs-mvc__name,
.webs-mvc__item--depth-3 .webs-mvc__name {
    font-weight: 550;
}

.webs-mvc__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    height: 23px;
    padding: 0 7px;
    color: var(--webs-mvc-muted);
    background: color-mix(in srgb, var(--webs-mvc-border) 45%, white);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.webs-mvc__toggle {
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    margin: 4px;
    padding: 0;
    color: var(--webs-mvc-muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.webs-mvc__toggle:hover,
.webs-mvc__toggle:focus-visible {
    color: var(--webs-mvc-accent);
    background: color-mix(in srgb, var(--webs-mvc-accent) 10%, transparent);
    outline: none;
}

.webs-mvc__chevron {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.webs-mvc__chevron svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.webs-mvc__toggle[aria-expanded="true"] .webs-mvc__chevron {
    transform: rotate(90deg);
}

.webs-mvc__submenu {
    position: relative;
    margin: 2px 0 4px 24px;
    padding: 2px 0 2px 12px;
    border-left: 1px solid var(--webs-mvc-border);
}

.webs-mvc__submenu[hidden] {
    display: none !important;
}

.webs-mvc__submenu .webs-mvc__row {
    border-radius: 8px;
}

.webs-mvc__submenu .webs-mvc__link {
    min-height: 42px;
    padding-top: 7px;
    padding-bottom: 7px;
}

.webs-mvc__no-results {
    margin: 0;
    padding: 28px 18px;
    color: var(--webs-mvc-muted);
    text-align: center;
    font-size: 14px;
}

.webs-mvc-alert {
    padding: 14px 16px;
    color: #7a2e0e;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
}

@media (max-width: 767px) {
    .webs-mvc {
        max-width: none;
        border-radius: min(var(--webs-mvc-radius), 12px);
    }

    .webs-mvc__body {
        max-height: none;
    }

    .webs-mvc__header {
        padding: 15px;
    }

    .webs-mvc__list--root {
        padding: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .webs-mvc__row,
    .webs-mvc__toggle,
    .webs-mvc__chevron,
    .webs-mvc__search-input {
        transition: none;
    }
}
