/**
 * WizV2 Wishlist Selection — CSS
 * Tooltip positioned near clicked heart icon + notification modal.
 */

/* ================================================================
   Body scroll lock
   ================================================================ */
body.wiz-wl-select-body-locked {
    overflow: hidden;
}

/* ================================================================
   Root — hidden by default, positioned fixed for viewport coords
   ================================================================ */
.wiz-wl-select {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.wiz-wl-select--open {
    display: block;
}

/* ================================================================
   Backdrop — transparent click-away layer (closes tooltip)
   ================================================================ */
.wiz-wl-select__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ================================================================
   Content — positioned tooltip box
   ================================================================ */
.wiz-wl-select__content {
    position: fixed;
    z-index: 99999;
    width: 300px;
    max-width: 90vw;
    max-height: 70vh;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ================================================================
   Header — "My Wishlist" + Create button (no X)
   ================================================================ */
.wiz-wl-select__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.wiz-wl-select__title {
    flex: 1;
}

.wiz-wl-select__create-btn {
    background: none;
    border: none;
    color: var(--primary, #075465);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.wiz-wl-select__create-btn:hover {
    opacity: 0.8;
}

/* ================================================================
   List — checkbox items
   ================================================================ */
.wiz-wl-select__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    overflow-y: auto;
    max-height: 200px;
}

.wiz-wl-select__empty {
    color: #888;
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
}

/* ================================================================
   Item row — checkbox + label + count
   ================================================================ */
.wiz-wl-select__item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

/* Checkbox — hidden native + adjacent custom span */
.wiz-wl-select__checkbox {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wiz-wl-select__check {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 1.5px solid #c0c0c0;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wiz-wl-select__check::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.wiz-wl-select__item:hover .wiz-wl-select__check {
    border-color: #999;
}

.wiz-wl-select__checkbox:checked + .wiz-wl-select__check {
    background: var(--primary, #075465);
    border-color: var(--primary, #075465);
}

.wiz-wl-select__checkbox:checked + .wiz-wl-select__check::after {
    transform: rotate(45deg) scale(1);
}

.wiz-wl-select__label {
    flex: 1;
    font-size: 14px;
    color: #222;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.wiz-wl-select__count {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}

/* ================================================================
   Footer
   ================================================================ */
.wiz-wl-select__footer {
    padding: 10px 16px;
    border-top: 1px solid #eaeaea;
}

.wiz-wl-select__done-btn {
    width: 100%;
    padding: 10px 20px;
    background: var(--primary, #075465);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.wiz-wl-select__done-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.wiz-wl-select__done-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================================
   Notification — "Saved to: Name ... +N" / "Removed from: Name ... +N"
   Vertical layout: top row (icon + text), divider, bottom row (Change)
   ================================================================ */
.wiz-wl-select__notification {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    max-width: 320px;
    overflow: hidden;
}

.wiz-wl-select__notif-content {
    display: flex;
    flex-direction: column;
}

/* Top row: heart icon + text */
.wiz-wl-select__notif-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.wiz-wl-select__notif-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.wiz-wl-select__notif-text {
    font-size: 14px;
    color: #222;
    line-height: 1.4;
}

.wiz-wl-select__notif-action {
    font-weight: 400;
}

.wiz-wl-select__notif-name {
    font-weight: 700;
}

.wiz-wl-select__notif-extra {
    font-weight: 700;
}

/* Removed state — grey heart */
.wiz-wl-select__notification--removed .wiz-wl-select__notif-icon svg path {
    fill: #999;
}

/* Horizontal divider between top and bottom */
.wiz-wl-select__notif-divider {
    height: 1px;
    background: #eaeaea;
}

/* Bottom row: Change button (centered) */
.wiz-wl-select__notif-change-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s;
}

.wiz-wl-select__notif-change-btn:hover {
    background: #f5f5f5;
}

