/* Плашка PRE-ORDER і її поповер. Окремий файл: app.css перегенеровується з original.css */
.preorder-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 0;
    font-family: 'IBMPlexMono', monospace;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: default;
}

.preorder-badge span {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
}

.preorder-badge-button {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.preorder-badge-button:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.preorder-badge-icon {
    width: 16px;
    height: 16px;
    flex: none;
}

.product-item-image > .preorder-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
}

.product-page-preorder {
    margin: 16px 0 24px;
}

.order-page-cart-product-info .preorder-badge {
    align-self: flex-start;
    margin-top: 8px;
    font-size: 12px;
    padding: 5px 8px;
}

.preorder-popover {
    position: absolute;
    z-index: 10000;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #fff;
    color: #000;
    border: 1px solid #000;
    box-sizing: border-box;
}

.preorder-popover:focus {
    outline: none;
}

.preorder-popover-close:focus-visible {
    outline: 2px solid #000;
}

.preorder-popover[hidden],
.preorder-popover-backdrop[hidden] {
    display: none;
}

.preorder-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #000;
}

.preorder-popover-title {
    font-family: 'Bicubik', sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

.preorder-popover-close {
    background: none;
    border: 0;
    padding: 0 0 0 16px;
    font-size: 22px;
    line-height: 1;
    color: #000;
    cursor: pointer;
}

.preorder-popover-body {
    padding: 16px;
    font-family: 'IBMPlexMono', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.preorder-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .5);
}

@media (max-width: 768px) {
    .preorder-badge {
        font-size: 12px;
        padding: 5px 8px;
    }

    .product-item-image > .preorder-badge {
        top: 6px;
        left: 6px;
        max-width: calc(100% - 12px);
        gap: 4px;
        padding: 3px 5px;
        font-size: 9px;
        letter-spacing: .02em;
    }

    .product-item-image > .preorder-badge .preorder-badge-icon {
        width: 11px;
        height: 11px;
    }

    .product-page-preorder {
        margin: 12px 0 16px;
    }

    .preorder-popover {
        position: fixed;
        left: 0 !important;
        right: 0;
        bottom: 0;
        top: auto !important;
        width: 100%;
        max-width: none;
        max-height: 80vh;
        overflow-y: auto;
        border-width: 1px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
        animation: preorder-sheet-in .2s ease-out;
    }
}

@keyframes preorder-sheet-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
