/*
 * Sticker Bunker Calculator — Frontend Styles
 * Dark, bold, StickerShuttle-style tile builder with neon-green accents.
 */

/* ============================================================
   Hide the default WooCommerce price + quantity on calculator products.
   ============================================================ */
.sbc-calculator-product .product .price,
.sbc-calculator-product .woocommerce-variation-price {
    display: none !important;
}
.sbc-calculator-product .quantity {
    display: none !important;
}

/* ============================================================
   Theme variables (shared by the panel + the home-page card)
   ============================================================ */
.sbc-calculator,
.sbc-shortcode-card {
    --sbc-accent: #22FF7A;
    --sbc-accent-hi: #4dff95;
    --sbc-panel: #15171c;
    --sbc-tile: #1d2026;
    --sbc-tile-hover: #23272f;
    --sbc-border: #30353f;
    --sbc-border-hi: #4a505c;
    --sbc-text: #eef1f4;
    --sbc-muted: #99a2ad;
}

/* ============================================================
   Builder panel
   ============================================================ */
.sbc-calculator {
    background: var(--sbc-panel);
    border: 1px solid var(--sbc-border);
    border-radius: 16px;
    padding: 22px;
    margin: 20px 0 14px;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--sbc-text);
    -webkit-font-smoothing: antialiased;
}
.sbc-calculator *,
.sbc-calculator *::before,
.sbc-calculator *::after { box-sizing: border-box; }

/* ============================================================
   Groups + labels
   ============================================================ */
.sbc-group { margin-bottom: 18px; }
.sbc-group-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sbc-text);
    margin-bottom: 9px;
}
.sbc-group-hint {
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sbc-muted);
    font-size: 12px;
}
.sbc-optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--sbc-muted);
    font-size: 11px;
}

/* ============================================================
   Tiles (Shape / Size / Material)
   ============================================================ */
.sbc-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.sbc-tiles .sbc-tile { flex: 1 1 auto; min-width: 84px; }
.sbc-tiles--size .sbc-tile { min-width: 72px; }

.sbc-tile { position: relative; display: block; cursor: pointer; margin: 0; }
.sbc-tile-input {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
    margin: 0;
}
.sbc-tile-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 100%;
    padding: 12px 10px;
    background: var(--sbc-tile);
    border: 2px solid var(--sbc-border);
    border-radius: 12px;
    color: var(--sbc-muted);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.sbc-tile:hover .sbc-tile-inner {
    border-color: var(--sbc-border-hi);
    background: var(--sbc-tile-hover);
    color: var(--sbc-text);
}
.sbc-tile-input:checked + .sbc-tile-inner {
    border-color: var(--sbc-accent);
    color: #fff;
    background: rgba(34, 255, 122, 0.12);
    box-shadow: 0 0 0 3px rgba(34, 255, 122, 0.18), 0 0 18px rgba(34, 255, 122, 0.16);
}
.sbc-tile-input:focus-visible + .sbc-tile-inner {
    outline: 2px solid var(--sbc-accent);
    outline-offset: 2px;
}

/* Shape icons (simple CSS shapes) */
.sbc-shape-ico {
    width: 22px; height: 22px;
    border: 2px solid currentColor;
    display: block;
    opacity: 0.9;
}
.sbc-shape-circle { border-radius: 50%; }
.sbc-shape-square { border-radius: 3px; }
.sbc-shape-rectangle { height: 15px; border-radius: 3px; }
.sbc-shape-die-cut { border-radius: 9px; }
.sbc-shape-kiss-cut { border-radius: 4px; position: relative; }
.sbc-shape-kiss-cut::after {
    content: ""; position: absolute; inset: 3px;
    border: 1px solid currentColor; border-radius: 2px;
}

/* Material swatches */
.sbc-swatch {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    display: block;
}
.sbc-swatch-matte { background: #6b7280; }
.sbc-swatch-gloss { background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 50%, #f3f4f6 100%); }
.sbc-swatch-holographic { background: linear-gradient(135deg, #ff6ec4, #7873f5, #4ade80, #ffd86e); }
.sbc-swatch-clear {
    background:
        linear-gradient(45deg, rgba(255,255,255,0.25) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.25) 75%),
        linear-gradient(45deg, rgba(255,255,255,0.25) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.25) 75%);
    background-color: #2b2f37;
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

/* ============================================================
   Custom size fields
   ============================================================ */
.sbc-custom-size { margin-top: 12px; }
.sbc-custom-row { display: flex; gap: 10px; }
.sbc-custom-field {
    flex: 1; display: flex; flex-direction: column; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--sbc-muted);
}
.sbc-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--sbc-tile);
    border: 2px solid var(--sbc-border);
    border-radius: 10px;
    color: var(--sbc-text);
    font-size: 15px;
    font-family: inherit;
}
.sbc-input:focus { outline: none; border-color: var(--sbc-accent); }

/* ============================================================
   Quantity price grid
   ============================================================ */
.sbc-qty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.sbc-qty-tile { position: relative; display: block; cursor: pointer; margin: 0; }
.sbc-qty-tile .sbc-tile-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sbc-qty-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 13px 8px 11px;
    background: var(--sbc-tile);
    border: 2px solid var(--sbc-border);
    border-radius: 12px;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.sbc-qty-tile:hover .sbc-qty-inner { border-color: var(--sbc-border-hi); background: var(--sbc-tile-hover); }
.sbc-tile-input:checked + .sbc-qty-inner {
    border-color: var(--sbc-accent);
    background: rgba(34, 255, 122, 0.12);
    box-shadow: 0 0 0 3px rgba(34, 255, 122, 0.18);
}
.sbc-tile-input:focus-visible + .sbc-qty-inner { outline: 2px solid var(--sbc-accent); outline-offset: 2px; }
.sbc-qty-count { font-size: 18px; font-weight: 800; color: var(--sbc-text); line-height: 1.1; }
.sbc-qty-total { font-size: 14px; font-weight: 700; color: var(--sbc-accent); }
.sbc-qty-each { font-size: 11px; color: var(--sbc-muted); }
.sbc-qty-badge {
    position: absolute;
    top: -9px; left: 50%; transform: translateX(-50%);
    background: var(--sbc-accent); color: #08110b;
    font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 20px; white-space: nowrap;
    display: none;
}
.sbc-qty-best .sbc-qty-badge { display: block; }

/* ============================================================
   Live price
   =========================================================== */
.sbc-price-display {
    margin: 20px 0;
    padding: 16px;
    text-align: center;
    background: linear-gradient(180deg, rgba(34, 255, 122, 0.10), rgba(34, 255, 122, 0.03));
    border: 1px solid rgba(34, 255, 122, 0.35);
    border-radius: 14px;
}
.sbc-price-label {
    display: block;
    font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--sbc-muted); font-weight: 700;
}
.sbc-price-value {
    display: block;
    font-size: 40px; font-weight: 900; line-height: 1.05; color: #fff;
    margin-top: 2px; letter-spacing: -0.01em;
    text-shadow: 0 0 22px rgba(34, 255, 122, 0.35);
}
.sbc-price-sub { display: block; font-size: 12px; color: var(--sbc-muted); margin-top: 5px; }
.sbc-price-error { display: block; margin-top: 6px; color: #ff8a8a; font-size: 12px; font-weight: 600; }

/* ============================================================
   Artwork dropzone
   ============================================================ */
.sbc-dropzone {
    display: block; position: relative; cursor: pointer;
    padding: 20px 16px; text-align: center;
    background: var(--sbc-tile);
    border: 2px dashed var(--sbc-border);
    border-radius: 12px;
    color: var(--sbc-muted);
    font-size: 14px;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.sbc-dropzone:hover,
.sbc-dropzone--over {
    border-color: var(--sbc-accent);
    background: rgba(34, 255, 122, 0.07);
    color: var(--sbc-text);
}
.sbc-file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sbc-dropzone-ico { font-size: 16px; margin-right: 4px; }
.sbc-dropzone strong { color: var(--sbc-text); }
.sbc-dropzone-browse { color: var(--sbc-accent); text-decoration: underline; }
.sbc-dropzone-file { display: block; color: var(--sbc-accent); font-weight: 700; font-size: 14px; }

/* ============================================================
   Notes + proof
   ============================================================ */
.sbc-textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--sbc-tile);
    border: 2px solid var(--sbc-border);
    border-radius: 10px;
    color: var(--sbc-text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 54px;
}
.sbc-textarea:focus { outline: none; border-color: var(--sbc-accent); }
.sbc-textarea::placeholder { color: #6b7280; }

.sbc-proof {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px;
    background: var(--sbc-tile);
    border: 1px solid var(--sbc-border);
    border-radius: 10px;
    cursor: pointer;
}
.sbc-proof input[type="checkbox"] {
    margin-top: 1px; width: 18px; height: 18px;
    accent-color: var(--sbc-accent); flex-shrink: 0; cursor: pointer;
}
.sbc-proof-text { font-size: 13px; color: var(--sbc-muted); line-height: 1.45; }
.sbc-proof-text strong { color: var(--sbc-text); }

/* ============================================================
   Validation + hints + quote fallback
   ============================================================ */
.sbc-validation-msg {
    margin-top: 12px; padding: 12px 14px;
    background: rgba(255, 107, 107, 0.10);
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 10px;
    color: #ff8a8a; font-size: 13px; line-height: 1.5;
}
.sbc-validation-msg ul { margin: 6px 0 0; padding-left: 18px; }

.sbc-hint { margin: 8px 0 0; font-size: 12px; color: var(--sbc-muted); line-height: 1.5; }
.sbc-hint a, .sbc-quote-link { color: var(--sbc-accent); text-decoration: none; font-weight: 600; }
.sbc-hint a:hover, .sbc-quote-link:hover { text-decoration: underline; }

.sbc-quote-fallback { margin-top: 16px; text-align: center; font-size: 13px; color: #99a2ad; line-height: 1.6; }

/* ============================================================
   Add to Cart button (home-page shortcode + WooCommerce product page)
   ============================================================ */
.sbc-add-to-cart-btn,
.sbc-calculator-product .single_add_to_cart_button {
    display: block !important;
    width: 100%;
    margin-top: 8px;
    padding: 16px 20px;
    font-size: 16px; font-weight: 800; letter-spacing: 0.03em; font-family: inherit;
    text-transform: uppercase; text-align: center;
    color: #08110b !important;
    background: #22FF7A !important;
    border: none; border-radius: 12px; cursor: pointer;
    box-shadow: 0 6px 20px rgba(34, 255, 122, 0.30);
    transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.sbc-add-to-cart-btn:hover,
.sbc-calculator-product .single_add_to_cart_button:hover {
    background: #4dff95 !important;
    box-shadow: 0 8px 26px rgba(34, 255, 122, 0.45);
}
.sbc-add-to-cart-btn:active,
.sbc-calculator-product .single_add_to_cart_button:active { transform: translateY(1px); }

/* ============================================================
   Home-page shortcode card (the builder as a hero panel)
   ============================================================ */
.sbc-shortcode-wrap { padding: 8px 0; box-sizing: border-box; }
.sbc-shortcode-card {
    max-width: 620px;
    margin: 0 auto;
    background: var(--sbc-panel);
    border: 1px solid var(--sbc-border);
    border-radius: 18px;
    padding: 26px 24px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}
.sbc-shortcode-card .sbc-calculator {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}
.sbc-shortcode-title {
    margin: 0 0 4px;
    font-size: 28px; font-weight: 900; line-height: 1.1;
    color: #fff; text-align: center; letter-spacing: -0.01em;
}
.sbc-shortcode-subtitle {
    margin: 0 0 20px;
    font-size: 14px; color: var(--sbc-muted); text-align: center; line-height: 1.5;
}

/* ============================================================
   Mobile
   ============================================================ */
@media ( max-width: 600px ) {
    .sbc-calculator { padding: 18px; }
    .sbc-shortcode-card { padding: 20px 16px; border-radius: 14px; }
    .sbc-shortcode-title { font-size: 23px; }
    .sbc-price-value { font-size: 34px; }
    .sbc-input, .sbc-textarea { font-size: 16px; } /* prevents iOS zoom on focus */
}
