/* SCRUM-33: pre-orders (product page block, card tags, cart and order labels, Coming soon page).
   Colours come from the storefront tokens (storefront-refresh.css), with the same values as fallbacks. */
.preorder-block {
    border: 1px solid #e9e1f5;
    border-inline-start: 4px solid var(--st-purple, #6638be);
    border-radius: 12px;
    background: var(--st-soft, #f2ecfa);
    padding: 14px 16px;
    margin-bottom: 16px;
    color: var(--st-ink, #252b45);
}

.preorder-block p {
    margin: 0 0 6px;
    font-size: 14px;
}

.preorder-block p:last-child {
    margin-bottom: 0;
}

.preorder-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--st-purple, #6638be);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.preorder-badge.is-coming-soon {
    background: #fff;
    color: var(--st-purple, #6638be);
    border: 1px solid var(--st-purple, #6638be);
}

.preorder-block .preorder-date {
    font-weight: 700;
}

.preorder-block .preorder-note {
    color: var(--st-muted, #697287);
    white-space: pre-line;
}

.preorder-block a {
    color: var(--st-purple, #6638be);
    font-weight: 600;
}

.preorder-price-tba {
    color: var(--st-purple, #6638be);
    font-weight: 700;
}

/* On product cards: replaces the price while coming soon, sits next to it while open. */
.preorder-card-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e0d3f3;
    background: var(--st-soft, #f2ecfa);
    color: var(--st-purple, #6638be);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
}

.preorder-card-tag.is-open {
    border-color: var(--st-purple, #6638be);
    background: var(--st-purple, #6638be);
    color: #fff;
}

/* Reference-style cards stack the price area in a column: keep the tag its own size, under the price. */
.ref-card-cta .preorder-card-tag {
    align-self: center;
    margin-top: 4px;
}

/* A date inside a sentence (preorder_html()): one unit, read left to right in Arabic text too. */
.preorder-date-value {
    white-space: nowrap;
    unicode-bidi: isolate;
}

/* Cart, checkout and order lines */
.preorder-item-label {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--st-soft, #f2ecfa);
    color: var(--st-purple, #6638be);
    font-size: 12px;
    font-weight: 600;
}

.preorder-item-label.is-blocked {
    background: #fff1f1;
    color: #b52c39;
}

.preorder-checkout-notice {
    border: 1px solid #e9e1f5;
    border-radius: 10px;
    background: var(--st-soft, #f2ecfa);
    color: var(--st-ink, #252b45);
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
}

/* Coming soon page */
.preorder-page .preorder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.preorder-page .preorder-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--st-line, #e6e9f1);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    color: var(--st-ink, #252b45);
    text-decoration: none;
    transition: box-shadow .15s ease, transform .15s ease;
}

.preorder-page .preorder-card:hover,
.preorder-page .preorder-card:focus-visible {
    box-shadow: 0 6px 22px rgba(37, 43, 69, .08);
    transform: translateY(-2px);
}

.preorder-page .preorder-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fafbfe;
}

.preorder-page .preorder-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
}

.preorder-page .preorder-card-image .preorder-card-tag {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
}

.preorder-page .preorder-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 16px;
}

.preorder-page .preorder-card-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.preorder-page .preorder-card-date {
    color: var(--st-muted, #697287);
    font-size: 13px;
}

.preorder-page .preorder-card-price {
    font-weight: 700;
    color: var(--st-ink, #252b45);
}

.preorder-page .preorder-empty {
    padding: 36px 24px;
    border: 1px dashed #d9cce9;
    border-radius: 16px;
    background: #fff;
    color: var(--st-muted, #697287);
    text-align: center;
}

.preorder-page .preorder-pagination {
    margin-top: 28px;
}

/* storefront-refresh.css colours every page link purple, the current one on a purple background too:
   keep the current page number readable here. */
.preorder-page .preorder-pagination .page-item.active .page-link {
    color: #fff;
}

/* Previous and next arrows point the way the page reads, in Arabic too. */
[dir="rtl"] .preorder-page .preorder-pagination .fa-arrow-left,
[dir="rtl"] .preorder-page .preorder-pagination .fa-arrow-right {
    transform: scaleX(-1);
}
