.mmse-widget,
.mmse-widget *,
.mmse-widget *::before,
.mmse-widget *::after {
    box-sizing: border-box;
}

.mmse-widget {
    --mmse-widget-gap: 16px;
    width: 100%;
    direction: rtl;
}

.mmse-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 0 0 var(--mmse-widget-gap);
}

.mmse-heading__title {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.8;
}

.mmse-heading__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.mmse-table-shell {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, .05);
    -webkit-overflow-scrolling: touch;
}

.mmse-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.mmse-table th,
.mmse-table td {
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.mmse-table thead th {
    padding: 15px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
}

.mmse-widget--sticky-head .mmse-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.mmse-table tbody tr {
    background: #fff;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.mmse-table tbody tr:hover {
    background: #fbfcfd;
}

.mmse-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #eef0f3;
    color: #344054;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
    transition: color .2s ease, background-color .2s ease;
}

.mmse-table tbody tr:last-child td {
    border-bottom: 0;
}

.mmse-store-name {
    color: #101828;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.8;
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}

.mmse-store-name:hover {
    opacity: .75;
}

.mmse-value--price {
    color: #101828;
    font-weight: 800;
}

.mmse-desktop-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #101828;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: transform .2s ease, color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.mmse-desktop-action:hover {
    transform: translateY(-1px);
    border-color: #101828;
    background: #101828;
    color: #fff;
}

.mmse-mobile-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.mmse-mobile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .04);
}

.mmse-mobile-item__name {
    min-width: 0;
    overflow: hidden;
    color: #101828;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mmse-mobile-more {
    appearance: none;
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #f8fafc;
    color: #344054;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.mmse-mobile-more:hover {
    transform: translateY(-1px);
    background: #101828;
    border-color: #101828;
    color: #fff;
}

.mmse-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}

.mmse-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mmse-modal__backdrop {
    appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, .52);
    cursor: pointer;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.mmse-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: min(82vh, 760px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 22px 22px 16px 16px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .24);
    transform: translateY(26px) scale(.985);
    transition: transform .25s cubic-bezier(.2,.75,.25,1);
}

.mmse-modal.is-open .mmse-modal__dialog {
    transform: translateY(0) scale(1);
}

.mmse-modal__handle {
    width: 44px;
    height: 4px;
    margin: 9px auto 0;
    border-radius: 99px;
    background: #d0d5dd;
}

.mmse-modal__inner {
    max-height: calc(min(82vh, 760px) - 13px);
    overflow-y: auto;
    padding: 14px 18px 18px;
    overscroll-behavior: contain;
}

.mmse-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef0f3;
}

.mmse-modal__heading {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.mmse-modal__eyebrow {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.8;
}

.mmse-modal__title {
    color: #101828;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.8;
    word-break: break-word;
}

.mmse-modal__close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #f9fafb;
    color: #667085;
    font: inherit;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.mmse-modal__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: 6px;
}

.mmse-modal__field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f3;
}

.mmse-modal__field-label {
    flex: 0 1 auto;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
}

.mmse-modal__field-value {
    min-width: 0;
    color: #101828;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.8;
    text-align: left;
    word-break: break-word;
}

.mmse-modal__store-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #101828;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: none;
    transition: opacity .2s ease, transform .2s ease;
}

.mmse-modal__store-link:hover {
    color: #fff;
    opacity: .9;
    transform: translateY(-1px);
}

body.mmse-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.mmse-empty {
    padding: 18px;
    border: 1px dashed #d0d5dd;
    border-radius: 14px;
    background: #f9fafb;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.9;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .mmse-widget *,
    .mmse-widget *::before,
    .mmse-widget *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
