.favorites-react {
    --favorites-red: #e54021;
    --favorites-blue: #3a81ae;
    --favorites-border: #e8eff2;
    --favorites-muted: #656366;
    --favorites-soft: #f5f7f8;
    color: #27282a;
}

.favorites-react--state,
.favorites-react--empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 320px;
    justify-content: center;
    text-align: center;
}

.favorites-react__spinner {
    animation: favorites-spin 0.8s linear infinite;
    border: 3px solid var(--favorites-border);
    border-top-color: var(--favorites-red);
    border-radius: 50%;
    height: 36px;
    width: 36px;
}

.favorites-react__heading {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 28px 0 32px;
}

.favorites-react__title-row {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.favorites-react__title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
    text-transform: none;
}

.favorites-react__count {
    color: #a4a4a4;
    font-size: 16px;
}

.favorites-react__clear,
.favorites-react__primary {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    text-decoration: none;
}

.favorites-react__clear {
    background: transparent;
    border: 0;
    color: var(--favorites-red);
}

.favorites-react__clear:disabled {
    opacity: 0.55;
}

.favorites-react__primary {
    background: var(--favorites-red);
    border: 1px solid var(--favorites-red);
    color: #fff;
}

.favorites-react__layout {
    align-items: flex-start;
    display: grid;
    gap: 20px;
    grid-template-columns: 325px minmax(0, 1fr);
}

.favorites-react__filters {
    min-width: 0;
    position: sticky;
    top: 104px;
}

.favorites-react__filters .filters-block {
    width: 100%;
}

.favorites-react__filters .filters-form-float {
    display: none !important;
}

.favorites-react__filter-error {
    background: #fff3f0;
    border: 1px solid #ffd4ca;
    border-radius: 8px;
    color: #9f2d17;
    padding: 12px 16px;
}

.favorites-react__filters-toggle {
    align-items: center;
    display: none;
    gap: 8px;
    margin-right: 12px;
}

.favorites-react__content {
    margin-top: 0;
    min-width: 0;
}

.favorites-react__toolbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.favorites-react__toolbar-left,
.favorites-react__toolbar-right {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.favorites-react__toolbar-left {
    flex-wrap: wrap;
}

.favorites-react__toolbar-right {
    justify-content: flex-end;
}

.favorites-react__select-all {
    align-items: center;
    background: #fff;
    border: 1px solid var(--favorites-border);
    border-radius: 8px;
    display: inline-flex;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    white-space: nowrap;
}

.favorites-react__select-all input,
.favorites-react__card-select input {
    accent-color: var(--favorites-red);
}

.favorites-react__toolbar-sort-col {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.favorites-react__bulk-actions {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.favorites-react__bulk-actions span {
    color: var(--favorites-muted);
    white-space: nowrap;
}

.favorites-react__bulk-actions button {
    background: #fff;
    border: 1px solid var(--favorites-border);
    border-radius: 8px;
    color: #27282a;
    min-height: 36px;
    padding: 8px 12px;
}

.favorites-react__bulk-actions button:first-of-type {
    border-color: var(--favorites-red);
    color: var(--favorites-red);
}

.favorites-react__bulk-actions button:disabled {
    opacity: 0.55;
}

.react__sort {
    --favorites-sort-bg: #fff;
    --favorites-sort-text: #27282a;
    --favorites-sort-muted: #656366;
    --favorites-sort-stroke: #f3f3f3;
    --favorites-sort-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    position: relative;
    width: 325px;
    z-index: 4;
}

.react__sort.is-open {
    z-index: 30;
}

.react__sort-native {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.react__sort-button {
    align-items: center;
    background-color: var(--favorites-sort-bg);
    border: 0;
    border-radius: 12px;
    box-shadow: var(--favorites-sort-shadow);
    color: var(--favorites-sort-text);
    display: flex;
    font: inherit;
    gap: 40px;
    justify-content: space-between;
    line-height: 1.2;
    min-height: 44px;
    padding: 12px;
    position: relative;
    text-align: left;
    width: 100%;
    z-index: 2;
}

.react__sort-button:focus-visible {
    outline: 2px solid var(--favorites-red);
    outline-offset: 2px;
}

.react__sort-title {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    min-width: 0;
}

.react__sort-icon {
    background-image: url("/storage/icons/arrow-down-up.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex: 0 0 16px;
    height: 16px;
    width: 16px;
}

.react__sort-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.react__sort-caret {
    background-image: url("/storage/icons/chevron-down.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
    flex: 0 0 20px;
    height: 20px;
    transition: transform 0.15s ease;
    width: 20px;
}

.react__sort.is-open .react__sort-caret {
    transform: rotate(180deg);
}

.react__sort-menu {
    background-color: var(--favorites-sort-bg);
    border-radius: 0 0 12px 12px;
    box-shadow: var(--favorites-sort-shadow);
    display: none;
    flex-direction: column;
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% - 1px);
    z-index: 1;
}

.react__sort.is-open .react__sort-menu {
    display: flex;
}

.react__sort-option {
    align-items: center;
    background-color: var(--favorites-sort-bg);
    border: 0;
    border-top: 1px solid var(--favorites-sort-stroke);
    color: var(--favorites-sort-muted);
    display: flex;
    font: inherit;
    gap: 10px;
    justify-content: space-between;
    line-height: 1.2;
    min-height: 44px;
    padding: 12px 12px 12px 32px;
    text-align: left;
    width: 100%;
}

.react__sort-option span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.react__sort-option:hover,
.react__sort-option:focus-visible,
.react__sort-option.active {
    background-color: var(--favorites-sort-stroke);
    color: var(--favorites-sort-text);
}

.react__sort-option:focus-visible {
    outline: 0;
}

.react__sort-check {
    background-image: url("/storage/icons/check.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex: 0 0 16px;
    height: 16px;
    width: 16px;
}

.favorites-react__view {
    display: inline-flex;
}

.favorites-react__view button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--favorites-muted);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.favorites-react__view button.is-active {
    color: var(--favorites-red);
}

.favorites-react__products {
    margin-top: 0;
}

.favorites-react__empty-filter {
    align-items: center;
    background: #fff;
    border: 1px solid var(--favorites-border);
    border-radius: 8px;
    color: var(--favorites-muted);
    display: flex;
    justify-content: center;
    min-height: 160px;
    padding: 24px;
    text-align: center;
}

.favorites-react__notice {
    background: #fff3f0;
    border: 1px solid #ffd4ca;
    border-radius: 8px;
    color: #9f2d17;
    margin-bottom: 16px;
    padding: 12px 16px;
}

.favorites-react__empty-visual {
    align-items: center;
    background: var(--favorites-soft);
    border-radius: 8px;
    color: var(--favorites-red);
    display: flex;
    height: 120px;
    justify-content: center;
    width: 160px;
}

.favorites-react__empty-visual .icon {
    height: 56px;
    width: 56px;
}

.favorites-react__item {
    position: relative;
}

.favorites-react__item.is-selected .product-preview {
    border-color: var(--favorites-red);
    box-shadow: 0 0 0 1px var(--favorites-red), var(--product-preview-hover-box-shadow);
}

.favorites-react__card-select {
    align-items: center;
    background: #fff;
    border: 1px solid var(--favorites-border);
    border-radius: 8px;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    left: 8px;
    position: absolute;
    top: 8px;
    width: 32px;
    z-index: 3;
}

.favorites-react__card-select input {
    height: 18px;
    margin: 0;
    width: 18px;
}

@keyframes favorites-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 991.98px) {
    .favorites-react__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .favorites-react__filters {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .favorites-react__filters {
        display: contents;
    }

    .favorites-react__filters .filters-block:not(.open) {
        display: none;
    }

    .favorites-react__filters-toggle {
        display: inline-flex;
    }
}

@media (max-width: 575.98px) {
    .favorites-react__heading {
        flex-direction: column;
        gap: 0;
        margin-top: 16px;
        margin-bottom: 0;
    }

    .favorites-react__filters-toggle {
        width: 100%;
    }

    .favorites-react__clear {
        width: 100%;
        justify-content: start;
        padding-left: 0;
    }

    .favorites-react__toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .favorites-react__toolbar-left,
    .favorites-react__toolbar-right {
        width: 100%;
    }

    .favorites-react__toolbar-right {
        justify-content: space-between;
    }

    .favorites-react__bulk-actions {
        flex-wrap: wrap;
    }

    .favorites-react__toolbar-sort-col {
        width: 100%;
    }

    .react__sort {
        width: 100%;
    }
}
