:root {
    --tby-qa-ease: cubic-bezier(.22, 1, .36, 1);
}

body.tby-qa-open {
    overflow: hidden !important;
    touch-action: none;
}

.tby-qa {
    position: fixed;
    inset: 0;
    z-index: 999999999;
    visibility: hidden;
    pointer-events: none;
}

.tby-qa.is-open {
    visibility: visible;
    pointer-events: auto;
}

.tby-qa__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, .26);
    opacity: 0;
    transition: opacity .22s var(--tby-qa-ease);
}

.tby-qa.is-open .tby-qa__backdrop {
    opacity: 1;
}

.tby-qa__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: min(86vh, 760px);
    overflow: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .12);
    transform: translate3d(0, 104%, 0);
    transition: transform .34s var(--tby-qa-ease);
}

.tby-qa.is-open .tby-qa__panel {
    transform: translate3d(0, 0, 0);
}

.tby-qa .tby-qa__close,
.tby-qa .tby-qa__close:hover,
.tby-qa .tby-qa__close:focus,
.tby-qa .tby-qa__close:focus-visible,
.tby-qa .tby-qa__close:active {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #111 !important;
    display: grid !important;
    place-items: center !important;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.tby-qa__close svg {
    width: 21px !important;
    height: 21px !important;
    display: block !important;
    overflow: visible !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.1 !important;
    stroke-linecap: round !important;
    pointer-events: none !important;
}

.tby-qa__close::before,
.tby-qa__close::after {
    content: none !important;
    display: none !important;
}

.tby-qa__head {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 16px;
    align-items: center;
    padding-right: 38px;
    margin-bottom: 24px;
}

.tby-qa__image-wrap {
    width: 86px;
    height: 106px;
    display: grid;
    place-items: center;
    background: #f7f7f7;
    overflow: hidden;
}

.tby-qa__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tby-qa__title {
    margin: 0 0 8px;
    color: #111;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tby-qa__price {
    color: #111;
    font-size: 13px;
    line-height: 1.4;
}

.tby-qa__price del {
    opacity: .45;
    margin-right: 6px;
}

/* Sale price: red text only, never yellow/highlighted */
.tby-qa__price ins,
.tby-qa__price ins .woocommerce-Price-amount,
.tby-qa__price ins .woocommerce-Price-currencySymbol {
    color: #d71920 !important;
    background: transparent !important;
    background-color: transparent !important;
    text-decoration: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.tby-qa__price mark,
.tby-qa__price .highlight,
.tby-qa__price [style*="background"] {
    background: transparent !important;
    background-color: transparent !important;
}

.tby-qa__attribute {
    margin-bottom: 22px;
}

.tby-qa__attribute-title {
    margin: 0 0 11px;
    color: #111;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tby-qa__options {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tby-qa__option {
    min-width: 44px;
    height: 40px;
    padding: 0 13px;
    border: 1px solid #d8d8d8;
    border-radius: 9px;
    background: #fff;
    color: #111;
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, opacity .2s ease;
    cursor: pointer;
}

.tby-qa__option.is-selected {
    border-color: #000;
    background: #000;
    color: #fff;
}

.tby-qa__option:disabled,
.tby-qa__option.is-disabled {
    opacity: .28;
    cursor: not-allowed;
    text-decoration: line-through;
}

.tby-qa__stock,
.tby-qa__notice {
    margin: -4px 0 16px;
    font-size: 10px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tby-qa__stock {
    color: #d60000;
}

.tby-qa__notice {
    color: #111;
}

.tby-qa .tby-qa__submit {
    box-sizing: border-box !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 18px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #000 !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    transition: opacity .2s ease, transform .2s ease;
    cursor: pointer;
}

.tby-qa__submit:active:not(:disabled) {
    transform: scale(.99);
}

.tby-qa__submit:disabled {
    opacity: .28;
    cursor: not-allowed;
}

.tby-qa-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 1000000000;
    transform: translate3d(-50%, 16px, 0);
    min-width: 164px;
    padding: 13px 18px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s var(--tby-qa-ease), visibility .25s ease;
}

.tby-qa-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate3d(-50%, 0, 0);
}

@media (min-width: 768px) {
    .tby-qa__panel {
        left: auto;
        right: 18px;
        bottom: 18px;
        width: min(430px, calc(100vw - 36px));
        max-height: calc(100vh - 36px);
        border-radius: 22px;
        transform: translate3d(0, 28px, 0) scale(.985);
        opacity: 0;
        transition: transform .38s var(--tby-qa-ease), opacity .3s ease;
    }

    .tby-qa.is-open .tby-qa__panel {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tby-qa__panel,
    .tby-qa__backdrop,
    .tby-qa-toast,
    .tby-qa__option,
    .tby-qa__submit {
        transition-duration: .01ms !important;
    }

    .tby-qa__spinner {
        animation-duration: 1.5s;
    }
}


