.wiz-search-dummy--history {
    height: 0;
    width: 0;
    position: absolute;
}

.wiz-search-dummy--history .product-listing-card-wrapper, .wiz-search-dummy--history .product-listing-card, .wiz-search-dummy--history .product-stack-layer, .wiz-search-dummy--history .product-listing-card {
    border: none !important;
}
.dummy-wiz-search-suggest-wrapper {
    height: 0;
    width: 0;
    position: absolute;
}

.dummy-wiz-search-suggest-wrapper .product-listing-card-wrapper, .dummy-wiz-search-suggest-wrapper .product-listing-card, .dummy-wiz-search-suggest-wrapper .product-stack-layer, .dummy-wiz-search-suggest-wrapper .product-listing-card {
    border: none !important;
}
.wiz-search-content__wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

.wiz-search-history__tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wiz-search-content {
    width: 100%;
    padding: 32px 50px;
    min-height: 100px;
    background-color: #fff;
    height: 100%;
    display: flex;
}

.wiz-search-results__wrapper {
    display: flex;
}

.wiz-search-content__right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hidden {
    display: none !important;
}

.wiz-search-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    overflow: auto;
    max-height: 70vh;
    overflow: auto;
    width: 100%;
}

.wiz-search-recent__wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    height: 100%;
}
.wiz-search-recent__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.wiz-search-recent__title {
    font-size: 16px;
    font-family: butler;
    white-space: nowrap;
}

.wiz-search-recent__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.wiz-search-results .product-listing-card-image-container {
    height: 300px;
}

.wiz-search-content__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.wiz-search-content__header-title {
    font-size: 16px;
    font-family: butler;
    white-space: nowrap;
}

.wiz-search-content__header-actions {
    color: #567F88;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.wiz-search-content__view-all {
    font-weight: 400;
}

.wiz-search-content__search-filter {
    font-weight: 500;
}

.wiz-search-content__filter-query {
    text-decoration: underline;
    margin-left: -0.15em;
    margin-right: -0.15em;
}

.wiz-search-content__search-filter::before {
    content: '"';
}

.wiz-search-content__search-filter::after {
    content: '"';
}

.wiz-search-content__left {
    max-width: 28%;
    min-width: 20%;
}

.wiz-search-suggest {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wiz-search-suggest__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 70vh;
    overflow: auto;
}

.wiz-search-suggest__item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.wiz-search-suggest__header {
    display: flex;
    flex-direction: column;
    color: #222222;
}

.wiz-search-suggest__title {
    font-size: 16px;
    font-weight: 500;
    font-family: butler;
}

.wiz-search-suggest__item-title {
    font-size: 14px;
    font-weight: 400;
}

.wiz-search-suggest__item-title--bold {
    font-weight: 600;
}

.wiz-search-suggest__item-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: #567F88;
}

.wiz-search-history {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    overflow: auto;
    max-height: 80vh;
}

.wiz-search-history__title {
    font-size: 16px;
    font-weight: 500;
    font-family: butler;
}
.wiz-search-history__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.wiz-search-history__clear {
    font-size: 12px;
    color: #4F555E;
    cursor: pointer;
}

.wiz-search-history__content {
    display: flex;
    flex-direction: column;
}
.wiz-search-history__content:has(.wiz-search-recent__empty:not(.hidden)) {
    min-height: 400px;
}
.wiz-search-history__searches {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wiz-search-history__tag-text {
    display: flex;
    border: 1px solid #dddee0;
    padding: 12px;
    background-color: #f6f7f9;
    color: #676d77;
    font-size: 14px;
    border-radius: 4px;
    gap: 4px;
}

.wiz-search-history__tag {
    display: flex;
    cursor: pointer;
    gap: 4px;
}

.wiz-search-history__tag.wiz-search-history__tag--loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.wiz-search-history__tag.wiz-search-history__tag--loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #dddee0;
    border-top-color: #676d77;
    border-radius: 50%;
    animation: wizSearchHistoryTagSpin 0.6s linear infinite;
}

@keyframes wizSearchHistoryTagSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.wiz-search-history__tag-image {
    height: 40px !important;
}

.wiz-search-history__tag-text:has(.wiz-search-history__tag-image) {
    padding: 0;
}

/* --- Empty States --- */
.wiz-search-content__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 500px;
}
.wiz-search-suggest__empty {
    display: flex;
    flex-direction: column;
    padding: 0px;
    width: 100%;
    gap: 16px;
}
.wiz-search-empty__box {
    display: flex;
    width: 100%;
    max-width: 350px;
    min-height: 160px;
    padding: 16px 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    background-color: #f5f5f5;
    text-align: center;
}
.wiz-search-empty__title--no-recent,
.wiz-search-empty__title--no-suggestions,
.wiz-search-empty__title--no-results {
    font-size: 14px;
    font-weight: 600;
    color: #222222;
}
.wiz-search-empty__subtitle--no-recent,
.wiz-search-empty__subtitle--no-suggestions,
.wiz-search-empty__subtitle--no-results {
    font-size: 12px;
    font-weight: 400;
    color: #212121;
}

/* ---------------------- */

/* ===== Modal Layout ===== */

.wiz-search-modal__input-container {
    background-color: white;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 24px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.wiz-search-modal__input-shell {
    width: min(500px, 100%);
    height: 44px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    background-color: #f5f5f5;
}

.wiz-search-modal__input-shell:hover {
    border-color: #222222;
}

.wiz-search-modal__input-shell:focus-within {
    border-color: #222222;
}

.wiz-search-modal__input-shell .wiz-search-modal__inline-icon {
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wiz-search-modal__input-shell .wiz-search-modal__inline-icon svg {
    width: 22px;
    height: 22px;
    color: #676D77;
}

.wiz-search-modal__input-container .wiz-search-modal__input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    color: #111827;
    background-color: transparent;
    padding: 0;
    margin: 0;
}

.wiz-search-modal__input-container .wiz-search-modal__input::placeholder {
    color: #9ca3af;
}

.wiz-search-modal__file-wrapper {
    flex: 1;
}

.wiz-search-modal__file {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 2px 12px;
    width: fit-content;
}

.wiz-search-modal__file.active {
    display: flex;
}

.wiz-search-modal__file-image {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wiz-search-modal__file-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wiz-search-modal__file-name {
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.wiz-search-modal__input-action {
    border: none;
    background: transparent;
    color: #6b7280;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wiz-search-modal__clear-btn {
    color: #676D77;
    font-size: 14px;
}

.wiz-search-modal__input-action.hidden {
    display: none !important;
}

.wiz-search-modal__divider {
    width: 1px;
    height: 22px;
    background-color: #d1d5db;
    flex-shrink: 0;
}

/* ===== Visual Search Dropdown ===== */

.wiz-search-modal__visual-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent;
    display: none;
    z-index: 1000;
}

.wiz-search-modal__visual-overlay.open {
    display: block;
}

.wiz-search-modal__visual-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0 auto;
    width: min(500px, 100%);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    padding: 20px;
    display: none;
    z-index: 1001;
}

.wiz-search-modal__visual-dropdown.open {
    display: flex;
    flex-direction: column;
}

.wiz-search-modal__visual-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    width: 100%;
    margin-bottom: 16px;
}

.wiz-search-modal__visual-title {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.wiz-search-modal__visual-upload-drag-text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 400;
    color: #4F555E;
    margin-top: 16px;
}

.wiz-search-modal__visual-close {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wiz-search-modal__visual-upload-wrapper {
    width: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.wiz-search-modal__visual-upload {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f6f7f9;
    border-radius: 10px;
    padding: 40px 0;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wiz-search-modal__visual-upload-icon {
    margin-bottom: 16px;
}

.wiz-search-modal__visual-upload-icon img {
    width: 24px;
    height: 24px;
}

.wiz-search-modal__visual-upload-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #666;
    margin: 0;
}

.wiz-search-modal__visual-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wiz-search-modal__visual-header-desc {
    font-size: 12px;
    font-weight: 400;
}

.wiz-search-modal__visual-file-input {
    display: none;
}

.wiz-search-modal__visual-uploading {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== Modal Close Button ===== */

.wiz-search-modal__close-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.wiz-search-modal__close-btn svg {
    width: 24px;
    height: 24px;
    color: #4b5563;
}

/* ===== Modal Container ===== */

.wiz-search-modal {
    position: fixed;
    top: 15px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: min(90vw, 1323px);
    background-color: transparent;
    display: none;
    flex-direction: column;
    align-items: center;
}

.wiz-search-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
}

.wiz-search-modal__overlay.open {
    display: block;
    z-index: 998;
}

.wiz-search-modal.open {
    display: flex;
    z-index: 999;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .wiz-search-content__wrapper {
        flex-direction: column;
    }

    .wiz-search-results {
        grid-template-columns: repeat(2, 1fr);
        max-height: none;
    }

    .wiz-search-content {
        padding: 10px;
    }

    .wiz-search-content {
        overflow: auto;
    }

    .wiz-search-content__left {
        max-width: 100%;
        width: 100%;
    }

    .wiz-search-recent__grid {
        max-height: none;
        grid-template-columns: repeat(2, 1fr);
    }

    .wiz-search-modal {
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
    }

    .wiz-search-modal__visual-dropdown {
        top: auto !important;
        bottom: 0;
        left: auto !important;
        position: fixed;
    }

    .wiz-search-modal__visual-overlay {
        background-color: rgba(0, 0, 0, 0.5);
    }
}

/* Skeleton Loader Styles */
@keyframes wiz-skeleton-search-shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.wiz-skeleton-search-loader-class {
    position: relative;
    overflow: hidden;
    background-color: #f5f7fa;
    pointer-events: none;
}

.wishlist-icon-circle.wiz-skeleton-search-loader-class {
    position: absolute;
}

.wiz-skeleton-search-loader-class::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #f5f7fa 0%,
        #e8ecf1 20%,
        #f5f7fa 40%,
        #f5f7fa 100%
    );
    background-size: 1000px 100%;
    animation: wiz-skeleton-search-shimmer 2s ease-in-out infinite;
    z-index: 1;
}
