/* ============================================================
   Lubinski SKU Search Widget — Light card theme
   ============================================================ */

/* .wpff-lubinski-wrapper {
    margin: auto;
} */
.wpff-oos-modal,
.wpff-lubinski-wrapper code {
    --theme-font-family: 'Google Sans', Sans-Serif;
}

.wpff-lubinski-wrapper code {
    padding: 0;
    background-color: transparent;    
}

.wpff-lubinski-wrapper button,
.wpff-lubinski-wrapper .button {
    border-radius: 3px !important;
    font-family: var(--theme-font-family);
}

/* ─── SEARCH BAR ─── */
.wpff-lubinski-search-bar {
    display: flex !important;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.wpff-lubinski-search-bar input {
    border: 1px solid #E4E5E7 !important;
    font-size: 16px !important;
    height: auto !important;
    border-radius: 3px !important;
    font-family: var(--theme-font-family) !important;
}

.wpff-lubinski-sku-input::placeholder,
input.wpff-lubinski-sku-input::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
    font-family: var(--theme-font-family) !important;
}

.wpff-lubinski-sku-input:focus,
input.wpff-lubinski-sku-input:focus {
    outline: none !important;
    box-shadow: none !important;
    background: #fff !important;
}

.wpff-oos-modal-dialog .elementor-button[type="submit"],
.wpff-lubinski-search-btn,
button.wpff-lubinski-search-btn {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 14px 22px !important;
    background: var(--theme-palette-color-1) !important;
    color: var( --e-global-color-blocksy_palette_8 ) !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    margin: 0 !important;
    height: auto !important;
    line-height: normal !important;
    min-height: 0 !important;
    box-shadow: none !important;
    font-family: var(--theme-font-family) !important;
}

.wpff-oos-modal-dialog .elementor-button[type="submit"]:hover:not(:disabled),
.wpff-lubinski-search-btn:hover:not(:disabled),
button.wpff-lubinski-search-btn:hover:not(:disabled) {
    background: var( --e-global-color-blocksy_palette_2 ) !important;
}

.wpff-lubinski-search-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ─── RESULT / STATUS MESSAGES ─── */
.wpff-lubinski-result {
    min-height: 0;
}

.wpff-lubinski-loading {
    color: #6b7280;
    font-size: 14px;
    padding: 8px 0;
}

.wpff-lubinski-error {
    color: #C10007;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-inline-end: 3px solid #C10007;
    padding: 12px 16px;
    border-radius: 3px;
    font-size: 14px;
    margin: 0;
}

/* ─── NOT FOUND CARD ─── */
.wpff-not-found-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FEF2F2;
    border: 1px solid #FFC9C9;
    border-radius: 3px;
    padding: 16px 20px;
    direction: rtl;
}

.wpff-not-found-icon {
    flex-shrink: 0;
    color: #C10007;
    line-height: 1;
    margin-top: 1px;
}

.wpff-not-found-text {
    flex: 1 1 auto;
    text-align: right;
}

.wpff-not-found-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #9F0712;
}

.wpff-not-found-hint {
    margin: 0;
    font-size: 14px;
    color: #E7000B;
}

/* ─── PRODUCT CARD ─── */
.wpff-lubinski-product-card {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.wpff-product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 16px;
    gap: 16px;
}

.wpff-product-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpff-product-info {
    flex: 1 1 auto;
    text-align: right;
    min-width: 0;
}

.wpff-product-info .wpff-product-title {
    margin: 0 0 4px;
    font-size: 1.1em;
    font-weight: 700;
    color: #0D0E10;
    line-height: 1.3;
}

.wpff-product-info .wpff-product-sku {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 13px;
}

.wpff-product-info .wpff-product-price {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--theme-palette-color-1);
    line-height: 1;
    direction: ltr;
    text-align: right;
}

.wpff-product-info .wpff-product-price .woocommerce-Price-amount {
    color: inherit;
}

.wpff-product-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0;
}

.wpff-product-footer {
    padding: 14px 20px 20px 20px;
}

.wpff-product-stock {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 500;
}

.wpff-stock-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00C950;
    flex-shrink: 0;
}

.wpff-stock-dot.wpff-out-of-stock {
    background: #C10007;
}

.wpff-stock-label {
    color: #008236;
}

/* Full-width green Add to Cart button */
.wpff-add-to-cart-btn,
button.wpff-add-to-cart-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 13px 20px !important;
    background: #00A63E !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.2px;
    margin: 0 !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
}

.wpff-add-to-cart-btn:hover:not(:disabled),
button.wpff-add-to-cart-btn:hover:not(:disabled) {
    background: #15803d !important;
    color: #fff !important;
}

.wpff-add-to-cart-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wpff-add-to-cart-feedback {
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    text-align: center;
    display: block;
    min-height: 18px;
}

/* ─── MINI CART ─── */
.wpff-lubinski-cart-section {
    margin-top: 20px;
}

.wpff-lubinski-mini-cart {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Cart header */
.wpff-mini-cart-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
}

.wpff-mini-cart-header-icon {
    color: #374151;
    flex-shrink: 0;
}

.wpff-mini-cart-title {
    margin: 0;
    padding: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #0D0E10;
    background: none;
    text-transform: none;
    letter-spacing: 0;
    border: none;
    flex: 1;
    font-family: var(--theme-font-family);
}

/* Items list */
.wpff-mini-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    grid-area: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpff-mini-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 14px;
    margin: 0 20px;
    border-radius: 3px;
    background-color: #F9FAFB;
}

/* Right section: name / sku / unit-price (visually on the right in RTL) */
.wpff-item-right {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

.wpff-item-name {
    display: block;
    font-weight: 500;
    color: #0D0E10;
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 2px;
    font-family: var(--theme-font-family);
}

.wpff-item-sku {
    display: block;
    color: #535353;
    font-size: 14px;
    margin-bottom: 4px;
}

.wpff-item-unit-price {
    display: block;
    color: var(--theme-palette-color-1);
    font-weight: 700;
    font-size: 18px;
    direction: ltr;
    text-align: right;
}

/* Left section: delete + line-price + qty controls (visually on the left in RTL) */
.wpff-item-left {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 30px);
    flex-shrink: 0;
}

/* Trash / delete button */
.wpff-item-delete,
button.wpff-item-delete {
    background: none !important;
    border: none !important;
    padding: 5px !important;
    cursor: pointer;
    color: #C10007;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background 0.15s;
    line-height: 1;
    min-height: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

.wpff-item-delete:hover,
button.wpff-item-delete:hover {
    background: #fef2f2 !important;
}

/* Line price (shown next to qty control) */
.wpff-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #0D0E10;
    white-space: nowrap;
    direction: ltr;
}

/* Quantity stepper */
.wpff-item-qty-control {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    overflow: hidden;
}

.wpff-qty-btn,
button.wpff-qty-btn {
    background: #fff !important;
    padding: 6px 10px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    line-height: 1;
    cursor: pointer;
    color: #374151;
    font-weight: 400;
    transition: background 0.15s;
    min-width: 30px;
    text-align: center;
    box-shadow: none !important;
    min-height: 0 !important;
    border: 1px solid #d1d5db;
}

.wpff-qty-btn:hover:not(:disabled),
button.wpff-qty-btn:hover:not(:disabled) {
    background: #eee !important;
}

.wpff-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wpff-qty-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    font-size: 14px;
    font-weight: 600;
    color: #0D0E10;
    padding: 5px 4px;
    background: transparent;
    border: 0;
}

/* Total row */
.wpff-mini-cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    margin: 20px 20px 0 20px;
    border-top: 2px solid #f3f4f5;
}

.wpff-total-label {
    color: #374151;
    font-weight: 700;
    font-size: 20px;
}

.wpff-total-amount {
    color: var(--theme-palette-color-1);
    font-size: 1.5em;
    font-weight: 700;
    direction: ltr;
}

/* Action buttons */
.wpff-mini-cart-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
}

.wpff-mini-cart-actions .button,
.wpff-mini-cart-actions a.button {
    flex: 1;
    padding: 14px 16px !important;
    font-size: 16px !important;
    font-weight: 500;
    text-align: center;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s;
    border: none !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
    box-shadow: none !important;
}

/* View Cart — gray (first in DOM = right in RTL) */
.wpff-btn-view-cart,
a.wpff-btn-view-cart {
    color: #fff !important;
    background: #9299a3 !important;
}

.wpff-btn-view-cart:hover,
a.wpff-btn-view-cart:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

/* Checkout — blue (last in DOM = left in RTL) */
.wpff-btn-checkout,
a.wpff-btn-checkout {
    background: var(--theme-palette-color-1) !important;
    color: #fff !important;
}

.wpff-btn-checkout:hover,
a.wpff-btn-checkout:hover {
    background: var( --e-global-color-blocksy_palette_2 ) !important;
    color: #fff !important;
}

/* Empty cart state */
.wpff-mini-cart-empty {
    padding: 32px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
    .wpff-lubinski-search-btn,
    button.wpff-lubinski-search-btn {
        padding: 14px 16px !important;
    }

    .wpff-mini-cart-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .wpff-item-right {
        width: 100%;
        order: -1;
    }

    .wpff-mini-cart-actions .button,
    .wpff-mini-cart-actions a.button {
        font-size: 12px !important;
        padding: 12px 10px !important;
        gap: 5px;
    }
}

/* ─── OUT-OF-STOCK NOTICE & CONTACT BUTTON ─── */
.wpff-stock-label--oos {
    color: #C10007;
}

.wpff-oos-notice-box {
    background: #FEFCE8;
    border: 1px solid #FFF085;
    border-radius: 3px;
    padding: 12px 16px;
    margin-bottom: 14px;
    text-align: right;
}

.wpff-oos-notice-line1 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #894b00;
    font-weight: 600;
}

.wpff-oos-notice-line2 {
    margin: 0;
    font-size: 14px;
    color: #A65F00;
    font-weight: 500;
}


.wpff-oos-contact-btn,
button.wpff-oos-contact-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 13px 20px !important;
    background: var(--theme-palette-color-1) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 3px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0 !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    font-family: var(--theme-font-family) !important;
}

button.wpff-oos-contact-btn {
    margin-bottom: 20px !important;
}

.wpff-oos-contact-btn:hover,
button.wpff-oos-contact-btn:hover {
    background: var( --e-global-color-blocksy_palette_2 ) !important;
    color: #fff !important;
}

/* ─── OUT-OF-STOCK MODAL ─── */

.wpff-oos-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wpff-oos-modal[hidden] {
    display: none !important;
}

.wpff-oos-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.wpff-oos-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    direction: rtl;
}

.wpff-oos-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #e5e7eb;
    gap: 12px;
}

.wpff-oos-modal-title {
    margin: 0;
    font-size: 1.05em;
    font-weight: 700;
    color: #0D0E10;
    font-family: var(--theme-font-family);
}

.wpff-oos-modal-close,
button.wpff-oos-modal-close {
    background: none !important;
    border: none !important;
    padding: 6px !important;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    box-shadow: none !important;
    min-height: 0 !important;
    line-height: 1;
    flex-shrink: 0;
}

.wpff-oos-modal-close:hover,
button.wpff-oos-modal-close:hover {
    background: #f3f4f6 !important;
    color: #0D0E10;
}

.wpff-oos-modal-body {
    padding: 20px;
}

/* Lock the pre-filled SKU input inside the popup form */
.wpff-oos-sku-locked {
    background: #f3f4f6 !important;
    color: #374151 !important;
    cursor: not-allowed !important;
    border-color: #d1d5db !important;
}

/* Prevent body scroll while modal is open */
body.wpff-modal-open {
    overflow: hidden;
}

.wpff-oos-modal-dialog .elementor-button[type="submit"] {
    width: 100%;
    margin: 20px 0 !important;
    border-radius: 3px !important;
}

@media (max-width: 600px) {
    .wpff-oos-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .wpff-oos-modal-dialog {
        max-height: 85vh;
        border-radius: 12px 12px 0 0;
    }
}
