/**
 * VoidSpec Bundles frontend CSS — slot-based (v1.1.5).
 * Dark navy + cyan aesthetic. Uses high-specificity selectors to override
 * theme styles that affect images and product layout inside WooCommerce.
 */

.vs-bundle-block {
    margin: 24px 0;
    padding: 20px 22px;
    background: #0a1420;
    border: 1px solid #1a2535;
    border-radius: 6px;
    font-family: 'Chakra Petch', -apple-system, sans-serif;
}

.vs-bundle-block .vs-bundle-heading {
    color: #00e5ff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.vs-bundle-block .vs-bundle-slots {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 18px;
}

/* Slot label */
.vs-bundle-block .vs-bundle-slot .vs-slot-label {
    color: #c8d8e8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.vs-bundle-block .vs-slot-required-tag,
.vs-bundle-block .vs-slot-optional-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.vs-bundle-block .vs-slot-required-tag {
    background: rgba(0, 229, 255, 0.15);
    color: #00e5ff;
}
.vs-bundle-block .vs-slot-optional-tag {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

/* ──────────────────────────────────────────
   FIXED SLOT PRODUCT
   High-specificity selectors to defeat theme styles that
   set width:100% or display:block on product images.
   ────────────────────────────────────────── */
.vs-bundle-block .vs-slot-fixed-product {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 12px !important;
    background: #0c1825 !important;
    border: 1px solid #1a2535 !important;
    border-radius: 4px !important;
}

.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-image {
    flex: 0 0 56px !important;
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    min-width: 56px !important;
    margin: 0 !important;
}
.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-image img,
.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-image .attachment-thumbnail,
.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-image .wp-post-image {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    min-width: 56px !important;
    max-height: 56px !important;
    min-height: 56px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    border: 1px solid #1a2535 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-info {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
}
.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-name {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    flex: 1 1 auto !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}
.vs-bundle-block .vs-slot-product-qty {
    color: #00e5ff;
    font-weight: 700;
    margin-left: 6px;
    font-size: 13px;
}
.vs-bundle-block .vs-slot-fixed-product .vs-slot-product-price {
    color: #c8d8e8 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-align: right !important;
    flex: 0 0 auto !important;
}
.vs-bundle-block .vs-slot-discount {
    color: #00e5ff;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
    padding: 2px 6px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 3px;
}

/* ──────────────────────────────────────────
   CHOICE SLOT — selectable cards
   ────────────────────────────────────────── */
.vs-bundle-block .vs-slot-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.vs-bundle-block .vs-slot-choice {
    display: block;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
.vs-bundle-block .vs-slot-choice input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vs-bundle-block .vs-slot-choice-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    background: #0c1825 !important;
    border: 2px solid #1a2535 !important;
    border-radius: 6px !important;
    transition: border-color 0.15s, background 0.15s;
}
.vs-bundle-block .vs-slot-choice:hover .vs-slot-choice-content {
    border-color: #2a3f55 !important;
    background: #0e1c2c !important;
}
.vs-bundle-block .vs-slot-choice input[type="radio"]:checked + .vs-slot-choice-content {
    border-color: #00e5ff !important;
    background: rgba(0, 229, 255, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.10);
}
.vs-bundle-block .vs-slot-choice.is-oos {
    opacity: 0.5;
    cursor: not-allowed;
}
.vs-bundle-block .vs-slot-choice.is-oos .vs-slot-choice-content {
    border-style: dashed !important;
}
.vs-bundle-block .vs-slot-choice-image {
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    margin: 0 !important;
}
.vs-bundle-block .vs-slot-choice-image img,
.vs-bundle-block .vs-slot-choice-image .attachment-thumbnail {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    object-fit: cover !important;
    border-radius: 3px !important;
    border: 1px solid #1a2535 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}
.vs-bundle-block .vs-slot-choice-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
.vs-bundle-block .vs-slot-choice-name {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 0 0 4px !important;
    line-height: 1.3 !important;
}
.vs-bundle-block .vs-slot-choice-price {
    color: #00e5ff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}
.vs-bundle-block .vs-slot-oos-tag {
    color: #ff6b6b;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 6px;
    font-weight: 700;
}

.vs-bundle-block .vs-slot-choice-none .vs-slot-choice-content {
    border-style: dashed !important;
    background: transparent !important;
}
.vs-bundle-block .vs-slot-choice-none .vs-slot-choice-name {
    color: #8aa0b8 !important;
    font-style: italic;
}

/* ──────────────────────────────────────────
   PRICING SUMMARY
   ────────────────────────────────────────── */
.vs-bundle-block .vs-bundle-summary {
    background: rgba(0, 229, 255, 0.04);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    padding: 16px;
    margin-top: 4px;
}
.vs-bundle-block .vs-bundle-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    color: #c8d8e8;
    font-size: 14px;
}
.vs-bundle-block .vs-bundle-totals-row .label { font-weight: 500; }
.vs-bundle-block .vs-bundle-totals-row .value { font-weight: 600; font-size: 15px; }
.vs-bundle-block .vs-bundle-totals-row .strikethrough {
    color: #8aa0b8;
    text-decoration: line-through;
}
.vs-bundle-block .vs-bundle-kit-price .label {
    color: #ffffff;
    font-weight: 700;
}
.vs-bundle-block .vs-bundle-kit-price .value {
    color: #00e5ff;
    font-size: 20px;
    font-weight: 700;
}
.vs-bundle-block .vs-bundle-savings-badge {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(0,229,255,0.15), rgba(0,229,255,0.05));
    border-left: 3px solid #00e5ff;
    color: #00e5ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    border-radius: 3px;
}
.vs-bundle-block .vs-bundle-savings-badge:empty { display: none; }

.vs-bundle-block .vs-bundle-stock-warning {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255, 184, 0, 0.08);
    border-left: 3px solid #ffb800;
    color: #ffd668;
    font-size: 13px;
    font-weight: 500;
    border-radius: 3px;
}

@media (max-width: 640px) {
    .vs-bundle-block { padding: 16px; }
    .vs-bundle-block .vs-slot-choices { grid-template-columns: 1fr; }
    .vs-bundle-block .vs-bundle-kit-price .value { font-size: 18px; }
}

/* ──────────────────────────────────────────
   AVAILABILITY ALERTS
   ────────────────────────────────────────── */
.vs-bundle-block .vs-bundle-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 4px;
    border-left: 4px solid;
}
.vs-bundle-block .vs-bundle-alert-error {
    background: rgba(255, 71, 87, 0.10);
    border-left-color: #ff4757;
    color: #ffb3b8;
}
.vs-bundle-block .vs-bundle-alert-warning {
    background: rgba(255, 184, 0, 0.10);
    border-left-color: #ffb800;
    color: #ffd668;
}
.vs-bundle-block .vs-bundle-alert-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.vs-bundle-block .vs-bundle-alert-error .vs-bundle-alert-title {
    color: #ff6b7a;
}
.vs-bundle-block .vs-bundle-alert-warning .vs-bundle-alert-title {
    color: #ffb800;
}
.vs-bundle-block .vs-bundle-alert-message {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
}
.vs-bundle-block .vs-bundle-alert-message div + div {
    margin-top: 4px;
}
.vs-bundle-block .vs-bundle-alert-note {
    font-size: 12px;
    color: #c8d8e8;
    font-style: italic;
    margin-top: 8px;
}
