/* New-customer offer: the gift box in cart / side cart / checkout, and the gift picker. WTS v3 look. */

.wts5g-slot:empty { display: none; }

.wts5g-slot {
    --g-ink: #211f1b;
    --g-muted: #646159;
    --g-forest: #304036;
    --g-forest-deep: #243129;
    --g-border: #d4d0c7;
    --g-soft: #f1eee7;
    margin: 12px 0 20px;
    font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
}

.wts5g-slot .wts5g {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--g-border);
    border-radius: 14px;
    background: #fff;
    color: var(--g-ink);
}

.wts5g-slot .wts5g--open { border-color: var(--g-forest); }

.wts5g-slot .wts5g__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--g-soft);
    color: var(--g-forest);
}

.wts5g-slot .wts5g__text { display: grid; gap: 2px; min-width: 0; }
.wts5g-slot .wts5g__text b { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--g-forest-deep); }
.wts5g-slot .wts5g__text span { font-size: 13px; line-height: 1.45; color: var(--g-muted); }

.wts5g-slot .wts5g__bar {
    display: block;
    height: 6px;
    margin-top: 6px;
    border-radius: 99px;
    background: var(--g-soft);
    overflow: hidden;
}
.wts5g-slot .wts5g__bar i { display: block; height: 100%; border-radius: inherit; background: var(--g-forest); }
.wts5g-slot .wts5g--progress { grid-template-columns: auto 1fr; }

.wts5g-slot .wts5g__btn,
.wts5g-slot a.wts5g__btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--g-forest);
    border-radius: 999px;
    background: var(--g-forest);
    color: #fff;
    font-weight: 650;
    font-size: 14px;
    line-height: 1;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.wts5g-slot .wts5g__btn:hover { background: var(--g-forest-deep); }
.wts5g-slot .wts5g__btn--ghost,
.wts5g-slot a.wts5g__btn--ghost { background: #fff; color: var(--g-forest); }

@media (max-width: 420px) {
    .wts5g-slot .wts5g { grid-template-columns: auto 1fr; }
    .wts5g-slot .wts5g__btn,
    .wts5g-slot a.wts5g__btn { grid-column: 1 / -1; width: 100%; }
}

/* Cart line price for a gift. */
.wts5g-free { text-decoration: none; font-weight: 700; color: #304036; }

/* ---------- Picker ---------- */

html.wts5g-open, html.wts5g-open body { overflow: hidden; }

.wts5g-modal {
    --g-ink: #211f1b;
    --g-muted: #646159;
    --g-forest: #304036;
    --g-forest-deep: #243129;
    --g-border: #d4d0c7;
    --g-border-soft: #e5e1d8;
    --g-soft: #f1eee7;
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--g-ink);
    -webkit-font-smoothing: antialiased;
}
.wts5g-modal[hidden] { display: none; }

.wts5g-modal__backdrop { position: absolute; inset: 0; background: rgba(26, 36, 30, 0.55); }

.wts5g-modal__panel {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    width: min(680px, 100%);
    max-height: min(860px, calc(100vh - 40px));
    max-height: min(860px, calc(100dvh - 40px));
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(20, 28, 23, 0.3);
    overflow: hidden;
    outline: none;
}

.wts5g-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 12px;
}
.wts5g-modal__head h2 { margin: 0 0 4px; font-weight: 700;
    font-size: 22px;
    line-height: 1.2; font-family: inherit; color: var(--g-forest-deep); letter-spacing: -0.01em; }
.wts5g-modal__head p { margin: 0; font-size: 14px; color: var(--g-muted); }

.wts5g-modal__close {
    appearance: none;
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--g-border);
    border-radius: 50%;
    background: #fff;
    color: var(--g-ink);
    cursor: pointer;
}

.wts5g-picked { padding: 4px 22px 14px; border-bottom: 1px solid var(--g-border-soft); }
.wts5g-picked__top { display: flex; align-items: center; gap: 12px; }
.wts5g-picked__count { margin: 0; flex: none; font-size: 14px; font-weight: 700; color: var(--g-forest-deep); }
.wts5g-picked__bar { flex: 1; height: 6px; border-radius: 99px; background: var(--g-soft); overflow: hidden; }
.wts5g-picked__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--g-forest); transition: width 0.2s ease; }

.wts5g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.wts5g-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 6px 5px 12px;
    border-radius: 999px;
    background: var(--g-forest);
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
}
.wts5g-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wts5g-chip em { font-style: normal; opacity: 0.8; }
.wts5g-chip button {
    appearance: none;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
}
.wts5g-chip--empty { padding: 5px 12px; background: var(--g-soft); color: var(--g-muted); }

.wts5g-modal__body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 22px 16px; -webkit-overflow-scrolling: touch; }
.wts5g-loading { margin: 24px 0; color: var(--g-muted); text-align: center; }

.wts5g-group h3 { margin: 16px 0 8px; font-weight: 700;
    font-size: 13px;
    line-height: 1.3; font-family: inherit; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-muted); }
.wts5g-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }

.wts5g-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--g-border-soft);
    border-radius: 14px;
    background: #fff;
}
.wts5g-item img, .wts5g-item__noimg { display: block; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--g-soft); }
.wts5g-item__main { min-width: 0; }
.wts5g-item__name { margin: 0; font-size: 14px; font-weight: 650; line-height: 1.3; color: var(--g-ink); }
.wts5g-item__meta { margin: 2px 0 0; font-size: 12px; line-height: 1.35; color: var(--g-muted); }
.wts5g-item__pick { display: block; margin-top: 6px; }
.wts5g-item__pick select {
    width: 100%;
    min-height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--g-border);
    border-radius: 8px;
    background: #fff;
    color: var(--g-ink);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.2;
    font-family: inherit;
}
.wts5g-item__add {
    appearance: none;
    min-width: 58px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--g-forest);
    border-radius: 999px;
    background: #fff;
    color: var(--g-forest);
    font-weight: 650;
    font-size: 13px;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
}
.wts5g-item__add:hover:not(:disabled) { background: var(--g-forest); color: #fff; }
.wts5g-item__add:disabled { border-color: var(--g-border); color: #9a978f; cursor: not-allowed; }

.wts5g-modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--g-border-soft);
    background: #fff;
}
.wts5g-status { flex: 1; margin: 0; font-size: 13px; color: var(--g-muted); }
.wts5g-status.is-error { color: #9b2c1f; }
.wts5g-save {
    appearance: none;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--g-forest);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
}
.wts5g-save:disabled { opacity: 0.6; cursor: wait; }

.wts5g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
    .wts5g-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .wts5g-modal { align-items: flex-end; padding: 0; }
    .wts5g-modal__panel {
        width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 20px 20px 0 0;
    }
    .wts5g-modal__head { padding: 16px 16px 10px; }
    .wts5g-modal__head h2 { font-size: 20px; }
    .wts5g-picked { padding: 2px 16px 12px; }
    .wts5g-modal__body { padding: 4px 16px 14px; }
    .wts5g-modal__foot { padding-left: 16px; padding-right: 16px; }
    .wts5g-save { flex: 1; }
    .wts5g-status:empty { display: none; }
}

/* 3.0.2: the checkout's heading styles were winning over the picker's (thin, uppercase titles). */
.wts5g-modal .wts5g-modal__head h2,
.wts5g-modal .wts5g-group h3 {
    font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 700 !important;
}
.wts5g-modal .wts5g-modal__head h2 {
    font-size: 22px !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
    color: #243129 !important;
}
.wts5g-modal .wts5g-group h3 {
    font-size: 13px !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #646159 !important;
}
@media (max-width: 560px) {
    .wts5g-modal .wts5g-modal__head h2 { font-size: 20px !important; }
}

/* 3.0.4: the box's button is a link on the guest box, and checkout/cart link colors were turning its text green on green. */
.wts5g-slot a.wts5g__btn,
.wts5g-slot a.wts5g__btn:link,
.wts5g-slot a.wts5g__btn:visited,
.wts5g-slot a.wts5g__btn:hover,
.wts5g-slot a.wts5g__btn:focus {
    color: #fff !important;
    text-decoration: none !important;
}
.wts5g-slot a.wts5g__btn--ghost,
.wts5g-slot a.wts5g__btn--ghost:link,
.wts5g-slot a.wts5g__btn--ghost:visited {
    color: #304036 !important;
}
.wts5g-slot a.wts5g__btn--ghost:hover,
.wts5g-slot a.wts5g__btn--ghost:focus {
    color: #fff !important;
}
