/* =============================================================
   Qode Booth Enhancements – tbe.css
   Dark theme — Ink & Oil Convention (Blocksy dark mode)
   ============================================================= */

/* ── Product page wrapper ─────────────────────────────────── */

.tbe-wrapper {
    margin-bottom: 1.5em;
}

.tbe-wrapper > p > label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
}

.tbe-wrapper select,
.tbe-wrapper input[type="number"] {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: inherit;
    padding: 8px 12px;
    border-radius: 2px;
    font-size: 15px;
    min-width: 70px;
    cursor: pointer;
}

/* ── Open modal button ─────────────────────────────────────── */

#tbe-open-modal {
    display: inline-block;
    margin: 10px 0 0;
    padding: 11px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s, border-color 0.2s;
}

#tbe-open-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
}

/* ── Artists saved badge ───────────────────────────────────── */

#tbe-artists-saved {
    display: inline-block;
    margin-left: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6fcf6f;
    vertical-align: middle;
}

/* ── Optional upgrades section ─────────────────────────────── */

.tbe-wrapper h3 {
    margin: 28px 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
}

.tbe-wrapper .tbe-addon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.tbe-wrapper .tbe-addon label {
    font-size: 14px;
    flex: 1;
    cursor: default;
}

.tbe-wrapper .tbe-addon input[type="number"] {
    width: 64px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Modal backdrop ─────────────────────────────────────────── */

.tbe-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.tbe-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

/* ── Modal panel ─────────────────────────────────────────────── */

.tbe-modal-content {
    position: relative;
    z-index: 2;
    /* Explicit colours — overrides Blocksy dark-mode inheritance */
    background: #141414;
    color: #f0f0f0;
    max-width: 680px;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    margin: 4vh auto;
    padding: 36px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    box-sizing: border-box;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

/* Force all text descendants to be light — fixes Blocksy theme bleed */
.tbe-modal-content,
.tbe-modal-content p,
.tbe-modal-content label,
.tbe-modal-content h3,
.tbe-modal-content h4,
.tbe-modal-content span,
.tbe-modal-content small {
    color: #f0f0f0;
}

.tbe-modal-content h3 {
    margin: 0 0 24px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 18px;
    color: #ffffff;
}

/* ── Close button ─────────────────────────────────────────── */

.tbe-close {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 10;
    font-size: 22px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: auto;
    color: rgba(255, 255, 255, 0.35);
    padding: 4px;
    transition: color 0.2s;
}

.tbe-close:hover {
    color: #fff;
}

/* ── Artist block ─────────────────────────────────────────── */

.tbe-artist {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tbe-artist:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tbe-artist h4 {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Two-column grid for text/email inputs */
.tbe-artist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tbe-artist-grid .tbe-field-full {
    grid-column: 1 / -1;
}

.tbe-artist input[type="text"],
.tbe-artist input[type="email"] {
    display: block;
    width: 100%;
    padding: 9px 12px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 2px;
    color: #f0f0f0;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.18s;
}

.tbe-artist input[type="text"]:focus,
.tbe-artist input[type="email"]:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.tbe-artist input[type="text"]::placeholder,
.tbe-artist input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.tbe-field-label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45) !important;
}

/* ── File upload & preview ─────────────────────────────────── */

.tbe-artist input[type="file"] {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.tbe-preview {
    display: block;
    margin-top: 10px;
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Validation error ─────────────────────────────────────── */

.tbe-error {
    border-color: #c0392b !important;
    background-color: rgba(192, 57, 43, 0.1) !important;
}

/* ── Save Artists button ────────────────────────────────────── */

#tbe-save-artists {
    display: inline-block;
    margin-top: 24px;
    margin-inline-start: 0;
    padding: 11px 28px;
    background: #fff;
    color: #111;
    border: none;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

#tbe-save-artists:hover {
    background: #e0e0e0;
}

/* ── Modal scrollbar (webkit) ───────────────────────────────── */

.tbe-modal-content::-webkit-scrollbar { width: 4px; }
.tbe-modal-content::-webkit-scrollbar-track { background: #1a1a1a; }
.tbe-modal-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }

/* ── Hide YITH balance subtotal + grand total rows ───────────── */
/* Replaced by our single "Full price inc. VAT" row below.       */
.yith-wcdp-grand-total-block__wrapper .yith-wcdp-grand-total-block__items,
.yith-wcdp-grand-total-block__wrapper .yith-wcdp-grand-total-block__total {
    display: none !important;
}

/* ── Full price row (block cart / checkout) ───────────────────── */
/* Appended after YITH's React block. Shows the complete order    */
/* total including VAT as a single clean line.                    */
.tbe-full-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: inherit;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 4px;
}

.tbe-full-price-label {
    flex: 1;
}

.tbe-full-price-value {
    font-weight: 700;
}

/* ── Rest payment row (block cart / checkout) ────────────────── */
.tbe-rest-payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 5px 0 2px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.tbe-rest-payment-label {
    flex: 1;
}

.tbe-rest-payment-value {
    font-weight: 400;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 520px) {
    .tbe-modal-content  { padding: 24px 20px; }
    .tbe-artist-grid    { grid-template-columns: 1fr; }
    .tbe-artist-grid .tbe-field-full { grid-column: 1; }
}

/* =============================================================
   Block Cart – fix item-detail layout
   The Block Cart renders each item_data entry as a <span> inside
   a <div class="wc-block-components-product-details">.
   The " / " separator is a real <span aria-hidden="true"> injected
   by the React component — NOT a CSS pseudo-element.
   All selectors use > span (direct child) so the sidebar,
   which shares the same class names, is never touched.
   ============================================================= */

/* =============================================================
   Block Cart + Block Checkout – fix item-detail layout
   The Block Cart/Checkout renders each item_data entry as a <span>
   inside .wc-block-components-product-details.
   The " / " separator is a real <span aria-hidden="true"> injected
   by React — NOT a CSS pseudo-element.
   Cart uses .wc-block-cart-items; Checkout uses
   .wc-block-components-order-summary-item. Both are targeted below.
   ============================================================= */

/* Each detail entry: force block so entries stack vertically */
.wc-block-cart-items .wc-block-components-product-details > span,
.wc-block-components-order-summary-item .wc-block-components-product-details > span {
    display: block !important;
}

/* Hide the React-injected " / " separator spans */
.wc-block-cart-items .wc-block-components-product-details span[aria-hidden="true"],
.wc-block-components-order-summary-item .wc-block-components-product-details span[aria-hidden="true"] {
    display: none !important;
}

/* Make the value span block so our inner tbe-ca spans can stack */
.wc-block-cart-items .wc-block-components-product-details .wc-block-components-product-details__value,
.wc-block-components-order-summary-item .wc-block-components-product-details .wc-block-components-product-details__value {
    display: block !important;
    margin-top: 4px;
}

/* Style the label span for YITH's "Full price:" / "Balance:" rows */
.wc-block-cart-items .wc-block-components-product-details .wc-block-components-product-details__name,
.wc-block-components-order-summary-item .wc-block-components-product-details .wc-block-components-product-details__name {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    margin-right: 6px;
}

/* =============================================================
   tbe-cart-meta — artist boxes inside the block cart value span
   Uses only <span> elements (valid inside WC's value <span>).
   ============================================================= */

span.tbe-cart-meta {
    display: block;
    margin-top: 6px;
}

/* Responsive grid wrapper for artist boxes */
span.tbe-cart-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cols on cart page desktop */
    gap: 6px;
    margin-top: 2px;
}

/* Checkout sidebar is narrow — always 1 column */
.wc-block-components-order-summary-item span.tbe-cart-meta-grid {
    grid-template-columns: 1fr;
}

/* Tablet: 2 columns */
@media (max-width: 960px) {
    span.tbe-cart-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    span.tbe-cart-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* One bordered box per artist */
span.tbe-ca {
    display: block;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

span.tbe-ca:last-child {
    margin-bottom: 0;
}

/* "ARTIST 1 — Sune Iversen" header row */
span.tbe-ca-header {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 7px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* One data row: label + value side by side */
span.tbe-ca-row {
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    padding: 2px 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Dim uppercase field label */
span.tbe-ca-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 70px;
}

/* Field value */
span.tbe-ca-val {
    color: rgba(255, 255, 255, 0.82);
}

/* "View photo" link */
a.tbe-ca-photo {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: underline;
}

a.tbe-ca-photo:hover {
    color: #fff;
}
