Files
3dealer/resources/css/checkout.css
T

590 lines
16 KiB
CSS
Raw Normal View History

2026-09-29 21:38:44 +03:00
/*
* 3dealer theme for the cart + checkout module (.bbk-* classes).
*
* Sits on top of boboko-core's generic checkout.css, which loads first (its
* own @vite entry). Rules here are deliberately plain and unlayered: the base
* file is unlayered too, and an unlayered rule beats any rule inside
* @layer components/utilities. Don't wrap this file in a layer.
*
* Everything maps onto an existing 3dealer pattern (x-ui.input, x-ui.button,
* x-ui.checkbox, x-ui.quantity, account-page headings). Square everywhere:
* no border-radius.
*/
/* ═══════════════════════════════════════════════════════════════════
TOKENS — the module's own variables, pointed at ours
═══════════════════════════════════════════════════════════════════ */
:root {
--bbk-font: var(--font-sans);
--bbk-color-text: var(--color-black);
--bbk-color-muted: var(--color-neutral-500);
--bbk-color-bg: var(--color-neutral-200);
--bbk-color-bg-muted: var(--color-neutral-300);
--bbk-color-border: var(--color-black);
--bbk-color-accent: var(--color-black);
--bbk-color-accent-text: var(--color-neutral-200);
--bbk-color-danger: var(--color-red-600);
--bbk-radius: 0;
--bbk-radius-sm: 0;
--bbk-shadow: none;
}
.bbk-cart,
.bbk-checkout-page,
.bbk-confirmation {
font-size: inherit;
line-height: inherit;
}
/* ═══════════════════════════════════════════════════════════════════
SHARED CONTROLS
═══════════════════════════════════════════════════════════════════ */
/* Primary CTA — x-ui.button "primary". The offset black block is a
box-shadow here rather than .btn-primary's ::before/::after, because the
module's buttons have no inner <span> to lift the label above a
positioned ::before. Same look, same easing. Uppercased here because the
module markup can't carry the `uppercase` class; strip-accents.js lists
these selectors so Greek still loses its tonos. */
2026-09-29 21:38:44 +03:00
.bbk-cart-checkout,
.bbk-checkout-continue {
@apply border-black bg-neutral-200 px-6 py-3.5 text-base font-bold uppercase italic text-black;
2026-09-29 21:38:44 +03:00
box-shadow: 10px 10px 0 var(--color-black);
transition: box-shadow 0.35s cubic-bezier(0.2, 0.78, 0.12, 0.86);
}
.bbk-checkout-continue {
@apply px-[46px] py-5 text-[19px];
}
.bbk-cart-checkout:hover,
.bbk-checkout-continue:hover {
opacity: 1;
}
.bbk-cart-checkout:not(:disabled):hover,
.bbk-checkout-continue:not(:disabled):hover {
box-shadow: 0 0 0 var(--color-black);
}
.bbk-cart-checkout:disabled,
.bbk-checkout-continue:disabled {
@apply opacity-50;
}
/* Secondary button — x-ui.button "secondary", size sm. Uppercased like the
primary CTA (see strip-accents.js). */
2026-09-29 21:38:44 +03:00
.bbk-cart-coupon-submit {
@apply border-black bg-transparent px-5 py-2 text-sm font-bold uppercase italic transition-colors hover:bg-black hover:text-neutral-200;
2026-09-29 21:38:44 +03:00
}
/* Text inputs — x-ui.input: bottom border only, transparent */
.bbk-field-input,
.bbk-cart-coupon-input,
.bbk-checkout-box-now-locker-search {
@apply border-0 border-b border-black bg-transparent px-0 py-2 placeholder:text-neutral-400;
}
.bbk-field-input:focus,
.bbk-field-input:focus-visible,
.bbk-cart-coupon-input:focus-visible,
.bbk-checkout-box-now-locker-search:focus {
@apply outline-none;
}
.bbk-field-input:disabled {
@apply cursor-not-allowed bg-transparent text-black opacity-50;
}
.bbk-field-input--error {
@apply border-red-600;
}
/* x-ui.select — native arrow off, arrow-down icon in its place */
select.bbk-field-input {
@apply cursor-pointer appearance-none pr-10;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='black'%3E%3Cpath fill='none' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M12 5V19M12 19L6 13M12 19L18 13'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 1rem center;
background-size: 16px;
}
/* x-ui.textarea */
textarea.bbk-field-input {
@apply resize-none;
}
/* Read-only value (the store's single country) — x-ui.input read-only */
.bbk-field-static {
@apply border-0 border-b border-black bg-transparent px-0 py-2 text-black opacity-60;
}
/* x-ui.field */
.bbk-field {
@apply gap-2;
}
.bbk-field-row {
@apply gap-8;
}
.bbk-field-label {
@apply text-black;
font-size: inherit;
font-weight: inherit;
}
.bbk-field-error {
@apply text-sm;
}
/* x-ui.checkbox — square box that fills brand green when ticked, with a
black check. Radios in the shipping/payment cards share its look but are
round with a round black dot: the one deliberate exception to the
project's no-border-radius rule, per the design. */
2026-09-29 21:38:44 +03:00
.bbk-checkbox {
@apply items-center gap-3;
2026-09-29 21:38:44 +03:00
font-size: inherit;
}
.bbk-checkbox--stacked {
@apply mt-0 text-sm;
}
.bbk-checkbox--stacked input {
@apply mt-0;
}
2026-09-29 21:38:44 +03:00
.bbk-checkbox--stacked a,
.bbk-checkout-withdrawal a,
.bbk-checkout-login-prompt a,
.bbk-checkout-note a {
@apply text-black underline hover:no-underline;
2026-09-29 21:38:44 +03:00
}
.bbk-checkbox input[type="checkbox"],
.bbk-checkout-shipping-option input[type="radio"],
.bbk-checkout-payment-option input[type="radio"] {
@apply relative m-0 size-5 shrink-0 cursor-pointer appearance-none border-[1.5px] border-black bg-transparent;
}
.bbk-checkbox input[type="checkbox"]:checked,
.bbk-checkout-shipping-option input[type="radio"]:checked,
.bbk-checkout-payment-option input[type="radio"]:checked {
@apply border-brand bg-brand;
2026-09-29 21:38:44 +03:00
}
.bbk-checkbox input[type="checkbox"]:checked::after,
.bbk-checkout-shipping-option input[type="radio"]:checked::after,
.bbk-checkout-payment-option input[type="radio"]:checked::after {
content: "";
position: absolute;
inset: 0;
margin: auto;
background: var(--color-black);
}
.bbk-checkbox input[type="checkbox"]:checked::after {
@apply size-3.5;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bbk-checkout-shipping-option input[type="radio"],
.bbk-checkout-payment-option input[type="radio"],
.bbk-checkout-shipping-option input[type="radio"]:checked::after,
.bbk-checkout-payment-option input[type="radio"]:checked::after {
@apply rounded-full;
}
.bbk-checkout-shipping-option input[type="radio"]:checked::after,
.bbk-checkout-payment-option input[type="radio"]:checked::after {
@apply size-2;
2026-09-29 21:38:44 +03:00
}
.bbk-checkbox input[type="checkbox"]:focus-visible,
.bbk-checkout-shipping-option input[type="radio"]:focus-visible,
.bbk-checkout-payment-option input[type="radio"]:focus-visible {
@apply outline-2 outline-offset-2 outline-current;
}
/* ═══════════════════════════════════════════════════════════════════
CART DRAWER
═══════════════════════════════════════════════════════════════════ */
.bbk-cart-panel-header {
@apply border-b-0 px-8 py-6;
2026-09-29 21:38:44 +03:00
}
.bbk-cart-heading {
@apply font-display text-h4 font-extrabold;
}
/* Icon buttons — same as the header's icons */
.bbk-cart-dismiss,
.bbk-cart-item-remove {
@apply text-black transition-opacity hover:bg-transparent hover:text-black hover:opacity-70;
}
/* Bin sits centred on the title's row, no negative-margin hit-area trick */
.bbk-cart-item-head {
@apply items-center;
}
.bbk-cart-item-remove {
@apply m-0 size-7;
}
.bbk-cart-item-remove-icon {
@apply size-6;
}
2026-09-29 21:38:44 +03:00
.bbk-cart-panel-body {
@apply p-8;
}
.bbk-cart-error {
@apply px-8;
}
.bbk-cart-items {
@apply mb-8 gap-8;
2026-09-29 21:38:44 +03:00
}
.bbk-cart-item-title {
@apply font-bold;
}
.bbk-cart-item-variant,
.bbk-cart-item-unit,
.bbk-line-fields {
@apply text-sm;
}
.bbk-cart-item-total {
@apply font-display font-bold;
}
/* Quantity stepper — x-ui.quantity */
.bbk-cart-qty-btn {
@apply size-8 bg-transparent text-xl font-bold text-black transition-colors hover:bg-black hover:text-neutral-200;
}
.bbk-cart-qty-input {
@apply h-8 w-10 border-x-0 bg-transparent font-display font-bold;
2026-09-29 21:38:44 +03:00
}
.bbk-cart-qty-btn:focus-visible,
.bbk-cart-qty-input:focus-visible {
@apply outline-2 outline-offset-0 outline-black;
}
/* Summary */
.bbk-cart-summary {
@apply gap-3 border-t-0 pt-6;
2026-09-29 21:38:44 +03:00
}
.bbk-cart-coupon {
@apply mb-3;
}
.bbk-cart-coupon-form {
@apply items-end gap-4;
}
/* Applied coupon — x-ui.status box */
.bbk-cart-coupon-applied {
@apply border-black bg-brand px-6 py-3 text-black;
}
.bbk-cart-coupon-remove {
@apply text-sm text-black underline hover:text-black hover:no-underline;
}
.bbk-cart-summary-row--total {
@apply mt-3 pt-4 font-display text-xl font-extrabold;
}
.bbk-cart-summary .bbk-cart-checkout {
@apply mt-6;
}
.bbk-cart-empty {
@apply py-10;
}
/* ═══════════════════════════════════════════════════════════════════
CHECKOUT PAGE
═══════════════════════════════════════════════════════════════════ */
.bbk-checkout-page {
@apply max-w-6xl px-8 py-16 lg:px-16;
}
.bbk-checkout-heading {
@apply mb-12 font-display text-h3 leading-[1.25] font-extrabold lg:text-h2;
2026-09-29 21:38:44 +03:00
}
.bbk-checkout {
@apply gap-16;
}
.bbk-checkout-main {
@apply gap-10;
}
.bbk-checkout-section {
@apply gap-8 border-b-0 pb-10;
2026-09-29 21:38:44 +03:00
}
.bbk-checkout-section-heading,
.bbk-checkout-summary-heading {
@apply font-display text-h4 font-extrabold;
}
.bbk-checkout-status,
.bbk-checkout-withdrawal,
.bbk-checkout-error {
@apply text-sm;
}
.bbk-checkout-note {
@apply text-base;
}
2026-09-29 21:38:44 +03:00
.bbk-checkout-login-prompt a {
@apply font-bold;
}
.bbk-invoice,
.bbk-checkout-shipping-fields {
@apply gap-8;
}
/* Shipping / payment choices — white cards; the picked one gets a brand
border. Every card carries the 2px border (transparent until picked) so
picking one doesn't shift the layout. */
.bbk-checkout-shipping-options,
.bbk-checkout-payment-options {
@apply gap-4;
}
2026-09-29 21:38:44 +03:00
.bbk-checkout-shipping-option,
.bbk-checkout-payment-option,
.bbk-checkout-shipping-confirmed {
@apply gap-4 px-6 py-5;
2026-09-29 21:38:44 +03:00
}
.bbk-checkout-shipping-option,
.bbk-checkout-payment-option {
@apply border-2 border-transparent bg-white transition-colors;
2026-09-29 21:38:44 +03:00
}
.bbk-checkout-shipping-option:has(input:checked),
.bbk-checkout-payment-option:has(input:checked) {
@apply border-brand;
2026-09-29 21:38:44 +03:00
}
.bbk-checkout-shipping-option-name,
.bbk-checkout-payment-option-name {
@apply font-bold;
}
.bbk-checkout-shipping-option-description {
@apply text-sm;
}
.bbk-checkout-shipping-option-price {
@apply font-display font-bold;
}
/* Box Now locker picker. Leaflet's own CSS arrives in a lazy chunk (after
this file), so its selectors are scoped under the picker to outrank it. */
.bbk-checkout-box-now-locker {
@apply mt-4 gap-4 p-6;
}
.bbk-checkout-box-now-locker-label {
@apply text-base font-bold;
}
.bbk-checkout-box-now-locker-map {
@apply border border-black;
}
.bbk-checkout-box-now-locker-chosen {
@apply text-sm font-bold;
}
.bbk-checkout-box-now-locker .leaflet-popup-content-wrapper,
.bbk-box-now-popup-image,
.bbk-box-now-popup-name::before {
border-radius: 0;
}
.bbk-checkout-box-now-locker .leaflet-popup-content-wrapper {
@apply border border-black bg-neutral-200 shadow-none;
}
.bbk-checkout-box-now-locker .leaflet-popup-tip {
@apply bg-neutral-200;
}
.bbk-box-now-popup-name::before {
@apply bg-brand;
}
.bbk-box-now-popup-note {
@apply bg-neutral-300;
}
.bbk-box-now-popup-select {
@apply border border-black bg-black text-sm text-neutral-200 transition-colors hover:bg-neutral-200 hover:text-black;
}
.bbk-box-now-popup-select:hover {
transform: none;
}
.bbk-box-now-popup-select--selected,
.bbk-box-now-popup-select--selected:hover {
@apply border-neutral-500 bg-neutral-500 text-neutral-200;
}
/* Order summary column. The header is sticky too (lg:h-26), so the
aside sticks below it rather than behind it. */
.bbk-checkout-aside {
@apply top-32;
}
.bbk-checkout-summary {
@apply border-0 bg-white p-6 lg:p-8;
2026-09-29 21:38:44 +03:00
}
.bbk-checkout-summary-heading {
@apply mb-6;
}
/* Payment */
.bbk-payment-element {
@apply my-2;
}
/* Processing overlay — square spinner, no radius */
.bbk-spinner {
@apply size-8;
border-color: var(--color-neutral-300);
border-top-color: var(--color-black);
border-radius: 0;
}
/* ═══════════════════════════════════════════════════════════════════
CONFIRMATION PAGE
2026-09-29 21:38:44 +03:00
═══════════════════════════════════════════════════════════════════ */
.bbk-confirmation {
@apply max-w-4xl px-8 py-16 lg:px-16;
}
.bbk-confirmation-heading {
@apply mb-12 font-display text-h3 leading-[1.25] font-extrabold lg:text-h2;
}
/* "You'll get a confirmation email" — brand-green strip, black icon */
.bbk-notice--info {
--bbk-notice-color: var(--color-black);
@apply items-center gap-2.5 border-0 bg-brand px-4 py-3.5 text-black;
}
/* Body copy size and weight (the module sets notices to 14px) */
.bbk-notice-text {
@apply text-lg leading-[1.389] font-normal;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-meta {
@apply mt-6 mb-12 gap-3 py-6;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-meta-row {
@apply items-baseline;
2026-09-29 21:38:44 +03:00
font-size: inherit;
}
.bbk-confirmation-meta-row dt {
@apply text-base;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-meta-row dd {
@apply font-bold;
}
.bbk-confirmation .bbk-checkout-note + .bbk-checkout-note {
@apply mt-2;
}
.bbk-confirmation-section {
@apply mt-12 border-t-0;
}
.bbk-confirmation-section-heading,
.bbk-confirmation-bank-transfer-heading {
@apply font-display text-h4 font-extrabold;
}
/* Order summary — white card, like the checkout page's summary column */
.bbk-confirmation-section:has(.bbk-confirmation-lines) {
@apply bg-white p-6 lg:p-8;
}
.bbk-confirmation-section-heading {
@apply mb-5;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-lines {
@apply mb-5 gap-5;
}
.bbk-confirmation-line .bbk-cart-item-media img {
@apply bg-white;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-line-name {
@apply mb-1 font-bold;
2026-09-29 21:38:44 +03:00
}
/* "× 1" drops to its own muted line under the name */
2026-09-29 21:38:44 +03:00
.bbk-confirmation-line-qty {
@apply block text-sm font-normal;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-line-total {
@apply font-display font-bold;
}
.bbk-confirmation .bbk-cart-summary {
@apply pt-0;
2026-09-29 21:38:44 +03:00
}
/* Addresses — two columns */
2026-09-29 21:38:44 +03:00
.bbk-confirmation-addresses {
@apply gap-12 pt-0;
2026-09-29 21:38:44 +03:00
}
.bbk-confirmation-address-heading {
@apply mb-3.5 font-display text-xl font-extrabold;
2026-09-29 21:38:44 +03:00
}
.bbk-address-lines {
@apply gap-1 text-base text-black;
}
.bbk-address-lines > :first-child {
@apply font-bold;
}
/* Bank transfer instructions (admin-authored HTML) */
.bbk-confirmation-bank-transfer-heading {
@apply mb-2;
}
.bbk-confirmation-bank-transfer-body {
@apply text-base leading-6;
2026-09-29 21:38:44 +03:00
}