/* =====================================================
   POST OFFER CART v2.3
   All selectors scoped to #poc-* / .poc-* only
   RTL / Hebrew
   ===================================================== */

#poc-floating-cart,
#poc-panel {
    --poc-primary : #232123;
    --poc-dark    : #F3641E;
    --poc-badge   : #e85d04;
    --poc-border  : #d9e8f2;
    --poc-text    : #2d3748;
    --poc-muted   : #718096;
    --poc-light   : #f4f8fb;
    font-family   : -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    box-sizing    : border-box;
    direction     : rtl;
}

/* ===================== Floating button ===================== */
#poc-floating-cart {
    position       : fixed;
    bottom         : 28px;
    left           : 28px;
    width          : 62px;
    height         : 62px;
    background: #e87034;
    color          : #fff;
    border-radius  : 50%;
    display        : flex;
    justify-content: center;
    align-items    : center;
    cursor         : pointer;
    z-index        : 99998;
    box-shadow     : 0 4px 18px rgba(0,0,0,.35);
    transition     : transform .2s ease, box-shadow .2s ease;
        border: 2.5px solid #e87034;
    user-select    : none;
    line-height    : 1;
}
#poc-floating-cart:hover                 { transform: scale(1.08); box-shadow: 0 6px 24px rgba(0,0,0,.45); }
#poc-floating-cart[aria-expanded="true"] { background: #2e2e4a; }
#poc-floating-cart svg                   { display: block; pointer-events: none; }

#poc-floating-cart .poc-count {
    position       : absolute;
    top            : -5px;
    right          : -5px;
    background     : var(--poc-badge);
    color          : #fff;
    min-width      : 22px;
    height         : 22px;
    border-radius  : 11px;
    font-size      : 11px;
    font-weight    : 700;
    display        : flex;
    justify-content: center;
    align-items    : center;
    padding        : 0 4px;
    border         : 2px solid #fff;
    line-height    : 1;
    pointer-events : none;
}

/* ===================== Panel ===================== */
#poc-panel {
    position      : fixed;
    bottom        : 102px;
    left          : 14px;
    width         : 360px;
    max-height    : calc(100vh - 140px);
    background    : #fff;
    border-radius : 14px;
    box-shadow    : 0 8px 40px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.1);
    z-index       : 99999;
    display       : flex;
    flex-direction: column;
    overflow      : hidden;
    opacity       : 0;
    transform     : translateY(16px) scale(.97);
    pointer-events: none;
    transition    : opacity .22s ease, transform .22s ease;
    text-align    : right;
}
#poc-panel.poc-panel-open {
    opacity       : 1;
    transform     : translateY(0) scale(1);
    pointer-events: auto;
    overflow      : visible;
}
#poc-panel::after {
    content      : '';
    position     : absolute;
    bottom       : -7px;
    left         : 22px;
    width        : 14px;
    height       : 14px;
    background   : #fff;
    transform    : rotate(45deg);
    border-radius: 2px;
    box-shadow   : 3px 3px 6px rgba(0,0,0,.07);
    pointer-events: none;
}

/* --- Panel header --- */
#poc-panel-header {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    padding        : 14px 16px 12px;
    border-bottom  : 1.5px solid #d9e8f2;
    flex-shrink    : 0;
    background     : #fff;
}
#poc-panel-header .poc-panel-title {
    font-size  : 15px;
    font-weight: 700;
    color      : #2d3748;
    margin     : 0;
}
#poc-panel-close {
    background     : #edf2f7;
    border         : none;
    width          : 28px;
    height         : 28px;
    border-radius  : 50%;
    font-size      : 17px;
    cursor         : pointer;
    color          : #2d3748;
    display        : flex;
    align-items    : center;
    justify-content: center;
    line-height    : 1;
    transition     : background .15s;
    padding        : 0;
    flex-shrink    : 0;
}
#poc-panel-close:hover { background: #e2e8f0; }

/* --- Tags section --- */
#poc-tags-section {
    padding      : 10px 14px;
    border-bottom: 1.5px solid #d9e8f2;
    background   : #f4f8fb;
    flex-shrink  : 0;
    min-height   : 42px;
}
#poc-tags-list {
    display    : flex;
    flex-wrap  : wrap;
    gap        : 6px;
    align-items: center;
}
#poc-tags-list .poc-tag {
    display      : inline-flex;
    align-items  : center;
    gap          : 4px;
    background   : #232123;
    color        : #fff;
    border-radius: 20px;
    padding      : 4px 9px 4px 5px;
    font-size    : 12px;
    font-weight  : 500;
    line-height  : 1.3;
    white-space  : nowrap;
    max-width    : 100%;
}
#poc-tags-list .poc-tag span {
    overflow     : hidden;
    text-overflow: ellipsis;
    white-space  : nowrap;
    max-width    : 200px;
}
#poc-tags-list .poc-tag-remove {
    background : none;
    border     : none;
    color      : rgba(255,255,255,.75);
    cursor     : pointer;
    font-size  : 15px;
    line-height: 1;
    padding    : 0;
    margin     : 0;
    display    : flex;
    align-items: center;
    flex-shrink: 0;
}
#poc-tags-list .poc-tag-remove:hover { color: #fff; }
#poc-tags-list .poc-empty-msg {
    font-size : 12px;
    color     : #718096;
    font-style: italic;
}

/* --- Add section with search dropdown --- */
#poc-add-section {
    padding      : 8px 14px;
    border-bottom: 1.5px solid #d9e8f2;
    flex-shrink  : 0;
    background   : #fff;
    position     : relative;
    z-index      : 50;
    overflow     : visible;
}
#poc-search-wrap {
    position: relative;
}
#poc-search-input {
    width        : 100%;
    border       : 1.5px solid #d9e8f2;
    border-radius: 8px;
    padding      : 8px 12px;
    font-size    : 13px;
    color        : #2d3748;
    background   : #f4f8fb;
    outline      : none;
    direction    : rtl;
    font-family  : inherit;
    box-sizing   : border-box;
    transition   : border-color .15s;
    display      : block;
}
#poc-search-input:focus { border-color: #232123; background: #fff; }
#poc-search-input::placeholder { color: #a0aec0; }

#poc-dropdown-list {
    display      : none;
    position     : absolute;
    top          : calc(100% + 4px);
    right        : 0;
    left         : 0;
    background   : #fff;
    border       : 1.5px solid #d9e8f2;
    border-radius: 8px;
    box-shadow   : 0 6px 20px rgba(0,0,0,.1);
    list-style   : none;
    margin       : 0;
    padding      : 4px 0;
    z-index      : 100;
    max-height   : 200px;
    overflow-y   : auto;
}
#poc-dropdown-list.poc-open { display: block; }

#poc-dropdown-list li {
    padding    : 8px 14px;
    font-size  : 13px;
    cursor     : pointer;
    color      : #2d3748;
    transition : background .1s;
    text-align : right;
    direction  : rtl;
}
#poc-dropdown-list li:hover                  { background: #f4f8fb; }
#poc-dropdown-list li.poc-already-added      { color: #a0aec0; pointer-events: none; font-style: italic; }
#poc-dropdown-list li.poc-no-results         { color: #a0aec0; font-style: italic; pointer-events: none; }

#poc-dropdown-list::-webkit-scrollbar        { width: 4px; }
#poc-dropdown-list::-webkit-scrollbar-thumb  { background: #d9e8f2; border-radius: 4px; }

/* --- Form --- */
#poc-form-wrap {
    padding   : 14px;
    overflow-y: auto;
    flex      : 1;
}
#poc-form-wrap * { box-sizing: border-box; }

#poc-form-wrap .poc-form-row  { display: flex; gap: 8px; margin-bottom: 10px; }
#poc-form-wrap .poc-field     { flex: 1; min-width: 0; }
#poc-form-wrap .poc-field-full{ width: 100%; margin-bottom: 10px; }

#poc-form-wrap input[type="text"],
#poc-form-wrap input[type="tel"],
#poc-form-wrap textarea {
    width          : 100%;
    border         : 1.5px solid #d9e8f2;
    border-radius  : 8px;
    padding        : 9px 11px;
    font-size      : 13px;
    color          : #2d3748;
    background     : #fff;
    outline        : none;
    transition     : border-color .15s, box-shadow .15s;
    direction      : rtl;
    font-family    : inherit;
    display        : block;
    box-shadow     : none;
    -webkit-appearance: none;
    appearance     : none;
    margin         : 0;
}
#poc-form-wrap input[type="text"]:focus,
#poc-form-wrap input[type="tel"]:focus,
#poc-form-wrap textarea:focus {
    border-color: #232123;
    box-shadow  : 0 0 0 3px rgba(26,155,220,.1);
}
#poc-form-wrap textarea { resize: vertical; }

#poc-form-wrap .poc-checkbox-wrap  { margin: 10px 0 12px; }
#poc-form-wrap .poc-checkbox-label {
    display    : flex;
    align-items: center;
    gap        : 7px;
    font-size  : 12px;
    color      : #2d3748;
    cursor     : pointer;
    direction  : rtl;
}
#poc-form-wrap .poc-checkbox-label input[type="checkbox"] {
    width       : 15px;
    height      : 15px;
    cursor      : pointer;
    accent-color: #232123;
    flex-shrink : 0;
    margin      : 0;
}

#poc-submit-btn {
    display        : flex;
    align-items    : center;
    justify-content: center;
    gap            : 7px;
    width          : 100%;
    background     : #232123;
    color          : #fff;
    border         : none;
    border-radius  : 8px;
    padding        : 11px 0;
    font-size      : 14px;
    font-weight    : 700;
    cursor         : pointer;
    transition     : background .2s, transform .15s;
    font-family    : inherit;
    line-height    : 1.4;
}
#poc-submit-btn:hover    { background: #1488c6; transform: translateY(-1px); }
#poc-submit-btn:active   { transform: translateY(0); }
#poc-submit-btn:disabled { background: #90cdf4; cursor: not-allowed; transform: none; }
#poc-submit-btn svg      { pointer-events: none; }

#poc-form-message {
    margin-top   : 10px;
    padding      : 9px 12px;
    border-radius: 8px;
    font-size    : 12px;
    text-align   : center;
    display      : none;
}
#poc-form-message.poc-success { background:#f0fff4; color:#276749; border:1.5px solid #9ae6b4; }
#poc-form-message.poc-error   { background:#fff5f5; color:#c53030; border:1.5px solid #fc8181; }

#poc-form-wrap::-webkit-scrollbar       { width: 4px; }
#poc-form-wrap::-webkit-scrollbar-thumb { background: #d9e8f2; border-radius: 4px; }

/* ===================== Add-to-cart button ===================== */
/* Singular post */
.poc-add-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600 !important;
    background: #232123 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 14px;
    transition: background .2s, transform .15s;
    line-height: 1.4;
    text-decoration: none;
    font-family: inherit;
    -webkit-appearance: none;
}
.poc-add-to-cart:hover    { background: #e87034 !important; color: #fff !important; transform: translateY(-1px); }
.poc-add-to-cart.poc-in-cart       { background: #e87034 !important; cursor: default; }
.poc-add-to-cart.poc-in-cart:hover { background: #e87034 !important; transform: none; }

/* Card button — top-left corner of each Elementor post card */
.poc-add-to-cart.poc-card-btn {
    position  : absolute;
    top       : 10px;
    left      : 10px;
    z-index   : 10;
    padding   : 5px 10px;
    font-size : 11px;
    margin    : 0;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* Ensure card has relative positioning for absolute button */
.elementor-post__card { position: relative !important; }

/* Mobile */
@media (max-width: 420px) {
    #poc-panel { width: calc(100vw - 20px); left: 10px; }
    #poc-form-wrap .poc-form-row { flex-direction: column; }
}
