/*
 * Out-of-stock presentation.
 *
 * Odoo owns stock; a size with nothing left stays visible on the product page
 * but cannot be picked. Loaded after app.css, and every rule doubles up its
 * class so it wins over the plain .weight-option rules there without !important.
 */

/* ---------- Sold-out size, product page + quick-add modal ---------- */

.weight-option.weight-option--out-of-stock,
.weight-option.weight-option--out-of-stock:hover {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.75;
    position: relative;
}

.weight-option.weight-option--out-of-stock .weight-label,
.weight-option.weight-option--out-of-stock .weight-price {
    text-decoration: line-through;
}

/* The radio's custom circle must not read as selectable either. */
.weight-option.weight-option--out-of-stock .weight-radio + .weight-label:before {
    border-color: #e5e7eb;
    background-color: #f3f4f6;
}

.weight-stock-tag {
    display: inline-block;
    margin-inline-start: 10px;
    padding: 2px 10px;
    border-radius: 999px;
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    vertical-align: middle;
}

.product-all-out-of-stock {
    margin-top: 12px;
    color: #b91c1c;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Nothing selectable left — the add button says so instead of acting. */
.add-cart.addCart--disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #e5e7eb;
    color: #6b7280;
    border-radius: 0.5rem;
    cursor: not-allowed;
    pointer-events: none;
    font-weight: 700;
}

/* ---------- Cart → checkout stock notice ---------- */

.stock-issues-lead {
    margin-bottom: 14px;
    font-size: 1.5rem;
    color: #4b5563;
}

.stock-issues-wrap {
    max-height: 320px;
    overflow-y: auto;
}

.stock-issues-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
}

.stock-issues-table th,
.stock-issues-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}

.stock-issues-table th {
    background-color: #f9fafb;
    font-weight: 700;
    color: #374151;
}

.stock-issues-table .stock-issue-name {
    text-align: start;
    font-weight: 600;
}

.stock-issues-table .stock-issue-size {
    display: block;
    color: #6b7280;
    font-weight: 400;
}

.stock-issues-table .stock-issue-num {
    font-weight: 700;
}

.stock-issues-table .stock-issue-available {
    color: #b91c1c;
}

.stock-issue-btn {
    margin: 2px 3px;
    padding: 6px 14px;
    border: 0;
    border-radius: 6px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.stock-issue-btn--fix {
    background-color: #942326;
    color: #ffffff;
}

.stock-issue-btn--remove {
    background-color: #e5e7eb;
    color: #374151;
}

.stock-issue-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
