/* =========================================================
   ProRide Local Supplier Stock
   Product availability, supplier cards and Smart Bundles
   ========================================================= */

#proride-local-box {
    margin-top: 15px;
}

#local-result {
    margin-top: 10px;
}

.local-title {
    color: #2e7d32;
    font-size: 15px;
    font-weight: 700;
}

.local-stock {
    margin-top: 8px;
    color: #222;
    font-size: 24px;
    font-weight: 700;
}

.local-stock.low,
.local-stock-special {
    color: #ef6c00;
}

.local-stock.high {
    color: #2e7d32;
}

.local-stock-not-found {
    color: #b91c1c;
}

.local-date {
    margin-top: 8px;
    color: #777;
    font-size: 12px;
}

.local-date.local-date-expired {
    color: #d9534f;
    font-weight: 700;
}

.local-warning {
    margin-top: 8px;
    color: #b45309;
    font-size: 13px;
}

.local-price {
    margin-top: 12px;
    color: #0f5132;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.local-price-label {
    margin-top: 10px;
    color: #777;
    font-size: 12px;
}

.local-shipping {
    margin-top: 10px;
    color: #0f5132;
    font-size: 14px;
    font-weight: 600;
}

.proride-supply-options {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.proride-supply-options-local-only .proride-supply-card {
    max-width: 100%;
}

.proride-supply-card {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: .2s;
}

.proride-supply-card:hover {
    transform: translateY(-2px);
}

.proride-supply-card.selected {
    border-color: #ed1d24;
    box-shadow: 0 0 0 3px rgba(237, 29, 36, .15);
}

.proride-supply-card.disabled {
    background: #f7f7f7;
    cursor: not-allowed;
    opacity: .55;
}

.proride-supply-card.disabled:hover {
    transform: none;
}

.local-special-order-card {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .15);
}

.local-special-order-card .local-title {
    color: #2e7d32;
}

.local-special-order-card .local-stock-special {
    color: #ef6c00;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.local-refresh-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
}

.local-refresh-btn:disabled {
    cursor: not-allowed;
    opacity: .6;
}

/* Product availability */
.mkdf-woo-single-page .mkdf-single-product-summary p.stock.in-stock {
    color: #039603 !important;
}

.stock.available-on-backorder {
    color: #ffc107;
    font-weight: 500;
}

/* Keep in-stock and backorder Smart Bundle messages vertically aligned. */
.mkdf-woo-single-page
.mkdf-single-product-summary
.woosb-availability p.stock.in-stock {
    margin: 0 !important;
}

@media (max-width: 768px) {
    .proride-supply-options {
        flex-direction: column;
    }

    .local-special-order-card .local-stock-special {
        font-size: 26px;
    }
}

/* Local supplier master switch: keep the visual card without implying an error. */
.proride-supply-card.local-supplier-unavailable-card {
    background: #f7f7f7;
    border-color: #d6d6d6;
    opacity: .72;
}

.proride-supply-card.local-supplier-unavailable-card .local-title,
.proride-supply-card.local-supplier-unavailable-card .local-stock,
.proride-supply-card.local-supplier-unavailable-card .local-shipping {
    color: #6b7280;
}

.proride-supply-card.local-supplier-unavailable-card .local-stock {
    font-size: 22px;
}
