/* ============================================================
   WCFS – Frontend Styles
   תאימות עם רוב ה-themes של WooCommerce
   ============================================================ */

/* ── Stock labels ────────────────────────────────────────── */

.wcfs-stock-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0 4px;
    line-height: 1.4;
}

.wcfs-label--future {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.wcfs-label--oos {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ── Disabled swatches (behavior = disable) ─────────────── */

/* גנרי — עובד עם רוב ה-swatch plugins */
.wcfs-disabled,
li.wcfs-disabled,
span.wcfs-disabled,
a.wcfs-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    position: relative;
}

/* קו אלכסוני מעל */
.wcfs-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom right,
        transparent calc(50% - 1px),
        rgba(150, 0, 0, 0.55),
        transparent calc(50% + 1px)
    );
    border-radius: inherit;
    pointer-events: none;
}

/* ── OOS label on swatch (behavior = label) ─────────────── */

.wcfs-oos-label {
    position: relative;
}

.wcfs-oos-label::before {
    content: attr(data-oos-label);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #721c24;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.wcfs-oos-label:hover::before {
    opacity: 1;
}

/* ── Future stock label on swatch ─────────────────────────── */

.wcfs-future-label {
    position: relative;
}

.wcfs-future-label::after {
    content: attr(data-future-label);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: #856404;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.wcfs-future-label:hover::after {
    opacity: 1;
}

/* ── Disabled select option ──────────────────────────────── */

select option.wcfs-oos:disabled {
    color: #999;
    background: #f5f5f5;
}
