/* ════════════════════════════════════════════════════════════════════
 * FEF ENQUIRY BASKET — shared styles
 * Covers: FEF Add to Enquiry, FEF Enquiry Quantity, FEF Enquiry Basket Icon,
 *         FEF Enquiry Basket (panel/page)
 * Elementor Style-tab controls target the classes below via {{WRAPPER}};
 * this file supplies layout/structure/animation that isn't exposed as
 * per-property controls.
 * ════════════════════════════════════════════════════════════════════ */

/* ── Add to Enquiry: wrapper & row ── */
.fef-eb-wrap{ position:relative; display:inline-block; max-width:100%; }
.fef-eb-row{ display:flex; align-items:center; gap:10px; }
.fef-eb-qty-above .fef-eb-row{ margin-top:8px; }

.fef-eb-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:none;
    cursor:pointer;
    background:#2e7d32;
    color:#fff;
    font-family:inherit;
    line-height:1.2;
    white-space:nowrap;
    transition:all .2s ease;
    background-repeat:no-repeat;
    background-position:center;
}
.fef-eb-btn-icon{ display:inline-flex; align-items:center; justify-content:center; line-height:1; }
.fef-eb-btn-icon svg{ width:1em; height:1em; fill:currentColor; }
.fef-eb-btn.fef-eb-icon-top{ flex-direction:column; }
.fef-eb-btn:disabled, .fef-eb-btn.fef-eb-in-basket{ cursor:default; opacity:.7; }

/* Hover effects (selected via the Style tab "Effect" dropdown) */
.fef-eb-btn.fef-eb-hover-lift:hover{ transform:translateY(-3px); }
.fef-eb-btn.fef-eb-hover-grow:hover{ transform:scale(1.05); }
.fef-eb-btn.fef-eb-hover-shrink:hover{ transform:scale(.96); }
.fef-eb-btn.fef-eb-hover-glow:hover{ animation:fef-eb-glow-pulse 1.2s ease-in-out infinite; }
.fef-eb-btn.fef-eb-hover-fill-sweep{ position:relative; overflow:hidden; z-index:0; }
.fef-eb-btn.fef-eb-hover-fill-sweep::before{
    content:""; position:absolute; inset:0; left:-110%;
    background:rgba(255,255,255,.18);
    transform:skewX(-15deg);
    transition:left .4s ease;
    z-index:-1;
}
.fef-eb-btn.fef-eb-hover-fill-sweep:hover::before{ left:110%; }
@keyframes fef-eb-glow-pulse{
    0%,100%{ box-shadow:0 0 0 0 rgba(46,125,50,.45); }
    50%{ box-shadow:0 0 0 10px rgba(46,125,50,0); }
}

.fef-eb-icon-spin{ animation:fef-eb-spin .6s linear; }
@keyframes fef-eb-spin{ from{ transform:rotate(0); } to{ transform:rotate(360deg); } }

/* ── Quantity stepper (shared by button widget, standalone widget, and basket rows) ── */
.fef-eb-qty{
    display:inline-flex;
    align-items:stretch;
    border:1px solid #ddd;
    border-radius:8px;
    background:#fff;
    overflow:hidden;
    flex-shrink:0;
    box-sizing:border-box;
    min-width:0;
}
.fef-eb-qty-step{
    flex:0 0 30px;
    width:30px;
    height:100%;
    border:none;
    background:transparent;
    cursor:pointer;
    font-size:16px;
    line-height:1;
    color:#555;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0;
    transition:color .15s, background .15s;
    -webkit-user-select:none;
    user-select:none;
}
.fef-eb-qty-step:hover{ color:#000; background:rgba(0,0,0,.05); }
.fef-eb-qty-step svg,
.fef-eb-qty-step i{ width:1em; height:1em; fill:currentColor; line-height:1; }
.fef-eb-qty-val{
    flex:1 1 auto;
    width:34px;
    min-width:30px;
    border:none;
    background:transparent;
    text-align:center;
    font-size:14px;
    font-weight:600;
    color:#222;
    padding:0 2px;
    -moz-appearance:textfield;
}
.fef-eb-qty-val::-webkit-outer-spin-button,
.fef-eb-qty-val::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

/* ── FEF Enquiry Quantity (standalone) wrapper ── */
.fef-eq-wrap{ display:flex; align-items:center; gap:8px; }
.fef-eq-wrap.fef-eq-label-top{ flex-direction:column; align-items:flex-start; }
.fef-eq-label{ font-size:13px; font-weight:600; }

/* ── Placeholder / editor-only warning ── */
.fef-eb-placeholder{ font-family:inherit; }

/* ── Toast ── */
.fef-enquiry-toast-host{
    position:fixed;
    bottom:24px;
    left:50%;
    transform:translateX(-50%);
    z-index:999998;
    display:flex;
    flex-direction:column;
    gap:8px;
    align-items:center;
    pointer-events:none;
}
.fef-enquiry-toast{
    background:rgba(20,20,20,.92);
    color:#fff;
    padding:10px 18px;
    border-radius:30px;
    font-size:13px;
    font-family:inherit;
    box-shadow:0 4px 16px rgba(0,0,0,.25);
    opacity:0;
    transform:translateY(10px);
    transition:opacity .3s ease, transform .3s ease;
}
.fef-enquiry-toast-show{ opacity:1; transform:translateY(0); }

/* ── Fly-to-basket image ── */
.fef-enquiry-fly-img{ box-shadow:0 4px 14px rgba(0,0,0,.3); }

/* ════════════════════════════════════════════════════════════════════
 * BASKET ICON
 * ════════════════════════════════════════════════════════════════════ */
.fef-ei-wrap{ display:inline-flex; align-items:center; gap:8px; position:relative; }
.fef-ei-wrap.fef-ei-price-below{ flex-direction:column; align-items:center; gap:2px; }
.fef-ei-trigger{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    cursor:pointer;
    line-height:1;
}
.fef-ei-icon{ display:inline-flex; line-height:1; color:#222; transition:color .2s; }
.fef-ei-icon svg{ width:1em; height:1em; fill:currentColor; }

.fef-ei-badge{
    position:absolute;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    font-weight:700;
    line-height:1;
    pointer-events:none;
}
.fef-ei-badge-top-right{ top:-6px; right:-8px; }
.fef-ei-badge-top-left{ top:-6px; left:-8px; }
.fef-ei-badge-bottom-right{ bottom:-6px; right:-8px; }
.fef-ei-badge-bottom-left{ bottom:-6px; left:-8px; }

.fef-ei-icon.fef-ei-shake,
.fef-ei-icon.fef-ei-anim-shake{ animation:fef-ei-shake .5s ease; }
@keyframes fef-ei-shake{
    0%,100%{ transform:rotate(0); }
    20%{ transform:rotate(-15deg); }
    40%{ transform:rotate(12deg); }
    60%{ transform:rotate(-8deg); }
    80%{ transform:rotate(5deg); }
}

.fef-ei-icon.fef-ei-anim-wobble{ animation:fef-ei-wobble .7s ease; }
@keyframes fef-ei-wobble{
    0%,100%{ transform:rotate(0); }
    25%{ transform:rotate(-12deg); }
    50%{ transform:rotate(10deg); }
    75%{ transform:rotate(-6deg); }
}

.fef-ei-icon.fef-ei-anim-vibrate{ animation:fef-ei-vibrate .55s ease; }
@keyframes fef-ei-vibrate{
    0%,100%{ transform:translateX(0); }
    20%{ transform:translateX(-2px); }
    40%{ transform:translateX(2px); }
    60%{ transform:translateX(-2px); }
    80%{ transform:translateX(2px); }
}

.fef-ei-icon.fef-ei-anim-bounce{ animation:fef-ei-bounce .6s ease; }
@keyframes fef-ei-bounce{
    0%,100%{ transform:scale(1); }
    35%{ transform:scale(1.28); }
    60%{ transform:scale(.92); }
    80%{ transform:scale(1.06); }
}
.fef-ei-badge.fef-ei-pop{ animation:fef-ei-pop .35s ease; }
@keyframes fef-ei-pop{
    0%{ transform:scale(1); }
    40%{ transform:scale(1.45); }
    100%{ transform:scale(1); }
}

.fef-ei-price{ font-family:inherit; white-space:nowrap; }

/* ════════════════════════════════════════════════════════════════════
 * BASKET PANEL (popup / slideout / dropdown / page)
 * ════════════════════════════════════════════════════════════════════ */
body.fef-basket-no-scroll{ overflow:hidden; }

.fef-basket-wrap{ position:relative; }

.fef-basket-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    z-index:999990;
    opacity:0;
    visibility:hidden;
    transition:opacity .25s ease;
}
.fef-basket-overlay.fef-basket-overlay-show{ opacity:1; visibility:visible; }

.fef-basket-panel{
    background:#fff;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    font-family:inherit;
    overflow:hidden;
    box-sizing:border-box;
    max-width:100%;
    min-width:0;
}

/* Default = "page" mode: render inline, in normal flow */
.fef-basket-mode-page .fef-basket-panel{
    position:relative;
    width:100%;
    max-width:480px;
}

/* Non-page modes: hidden by default, fixed positioned, shown via .fef-basket-open */
.fef-basket-mode-popup .fef-basket-panel,
.fef-basket-mode-slideout .fef-basket-panel,
.fef-basket-mode-dropdown .fef-basket-panel,
.fef-basket-mode-popup_mobile_slideout .fef-basket-panel,
.fef-basket-mode-dropdown_mobile_slideout .fef-basket-panel{
    position:fixed;
    z-index:999991;
    max-height:90vh;
    visibility:hidden;
    opacity:0;
    pointer-events:none;
}

/* ── Popup (center modal) ── */
.fef-basket-panel.fef-basket-eff-popup{
    top:50%; left:50%;
    transform:translate(-50%,-45%);
    transition:opacity .25s ease, transform .25s ease, visibility .25s;
}
.fef-basket-panel.fef-basket-eff-popup.fef-basket-open{
    visibility:visible; opacity:1; pointer-events:auto;
    transform:translate(-50%,-50%);
}

/* ── Slide-out drawer ── */
.fef-basket-panel.fef-basket-eff-slideout{
    top:0; bottom:0; height:100%; max-height:100vh;
    border-radius:0;
    transition:transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
}
.fef-basket-side-right .fef-basket-panel.fef-basket-eff-slideout{ right:0; transform:translateX(100%); }
.fef-basket-side-left .fef-basket-panel.fef-basket-eff-slideout{ left:0; transform:translateX(-100%); }
.fef-basket-panel.fef-basket-eff-slideout.fef-basket-open{
    visibility:visible; opacity:1; pointer-events:auto;
    transform:translateX(0);
}

/* ── Dropdown (mini-cart) — anchored near top of viewport under a header icon.
   True per-icon anchoring needs the icon's position; we approximate with a
   fixed top offset, which works well for header-placed icons (the common case). */
.fef-basket-panel.fef-basket-eff-dropdown{
    top:70px;
    max-height:80vh;
    transform:translateY(-8px) scale(.98);
    transition:opacity .2s ease, transform .2s ease, visibility .2s;
}
.fef-basket-dd-right .fef-basket-panel.fef-basket-eff-dropdown{ right:20px; }
.fef-basket-dd-left .fef-basket-panel.fef-basket-eff-dropdown{ left:20px; }
.fef-basket-panel.fef-basket-eff-dropdown.fef-basket-open{
    visibility:visible; opacity:1; pointer-events:auto;
    transform:translateY(0) scale(1);
}

@media (max-width: 480px){
    .fef-basket-panel.fef-basket-eff-popup,
    .fef-basket-panel.fef-basket-eff-dropdown{
        width:94vw !important;
    }
}

/* ── Header ── */
.fef-basket-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:16px 18px;
    background:#fafafa;
    flex-shrink:0;
    position:relative;
}
.fef-basket-title-group{ display:inline-flex; align-items:center; gap:8px; min-width:0; }
.fef-basket-title{ font-weight:700; font-size:18px; display:inline-flex; align-items:center; gap:6px; }
.fef-basket-count-inline{ font-weight:600; opacity:.75; font-size:.85em; }
.fef-basket-count-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:24px;
    height:24px;
    padding:0 6px;
    border-radius:12px;
    background:#2e7d32;
    color:#fff;
    font-size:12px;
    font-weight:700;
    line-height:1;
    flex-shrink:0;
}
.fef-basket-close{
    border:none; background:transparent; cursor:pointer;
    font-size:18px; color:#777; line-height:1;
    padding:0;
    flex-shrink:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
}
.fef-basket-close:hover{ color:#222; }

/* "Back to basket" button — clears the embedded form / success message */
.fef-basket-form-back{
    border:none; background:transparent; cursor:pointer;
    font-size:13px; color:#2e7d32; font-weight:600;
    padding:6px 10px; border-radius:6px; line-height:1;
    display:inline-flex; align-items:center; gap:4px;
    flex-shrink:0; white-space:nowrap;
}
.fef-basket-form-back:hover{ background:#e8f5e9; }

/* Count badge — corner placement */
.fef-basket-count-pos-corner .fef-basket-count-badge{ position:absolute; top:14px; right:18px; }

/* Close button — absolute placement */
.fef-basket-close-pos-top-left .fef-basket-close{ position:absolute; top:12px; left:14px; }
.fef-basket-close-pos-top-right .fef-basket-close{ position:absolute; top:12px; right:14px; }
.fef-basket-close-pos-bottom-left .fef-basket-close{ position:absolute; bottom:12px; left:14px; }
.fef-basket-close-pos-bottom-right .fef-basket-close{ position:absolute; bottom:12px; right:14px; }

/* ── Sticky in column (page mode only) ──
   Applied to the WIDGET WRAPPER (a flex child of the column's widget-wrap),
   which has a tall enough containing block to actually stick while scrolling.
   The `top` offset is set inline per-instance via the Sticky Offset control. */
.elementor-widget-fef_enquiry_basket.fef-basket-sticky-widget{
    position:-webkit-sticky;
    position:sticky;
    align-self:flex-start;
    z-index:20;
}

/* ── Fixed height: once Use Fixed Height is on, the panel itself gets an exact
   height via the Elementor control; the body must be the part that scrolls. ── */
.fef-basket-panel{ min-height:0; } /* allows flex children to actually shrink/scroll inside a fixed-height flex column */

/* ── Body ── */
.fef-basket-body{ flex:1 1 auto; overflow-y:auto; padding:8px 18px; min-height:0; }
.fef-basket-empty{ text-align:center; padding:40px 10px; color:#999; }
.fef-basket-empty-icon{ font-size:40px; display:block; margin-bottom:12px; opacity:.4; }
.fef-basket-empty-icon svg{ width:1em; height:1em; fill:currentColor; }
.fef-basket-empty p{ margin:0; font-size:14px; }

.fef-basket-item{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:14px 0;
    border-bottom:1px solid #eee;
    min-width:0;
    box-sizing:border-box;
}
.fef-basket-item:last-child{ border-bottom:none; }
.fef-basket-item-img{
    width:56px; height:56px;
    border-radius:6px;
    object-fit:cover;
    background:#f0f0f0;
    flex-shrink:0;
}
.fef-basket-item-icon{
    width:56px; height:56px;
    border-radius:6px;
    flex-shrink:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#f0f0f0;
    color:#888;
}
.fef-basket-item-icon svg,
.fef-basket-item-icon i{ width:26px; height:26px; font-size:26px; line-height:1; }
.fef-basket-item-icon svg{ fill:currentColor; }
.fef-basket-item-info{ flex:1 1 auto; min-width:0; }
.fef-basket-item-title{
    font-size:14px; font-weight:600; color:#222;
    margin-bottom:4px;
    overflow:hidden; text-overflow:ellipsis;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}

/* Item-name icon (optional icon beside each record's title) */
.fef-basket-item-name{ display:flex; gap:6px; min-width:0; width:100%; }
.fef-basket-item-name .fef-basket-item-title{ flex:1 1 auto; min-width:0; margin-bottom:0; }
.fef-basket-item-name-icon{
    display:inline-flex; align-items:center; justify-content:center;
    line-height:1; flex-shrink:0;
}
.fef-basket-item-name-icon svg,
.fef-basket-item-name-icon i{ width:1em; height:1em; fill:currentColor; }

.fef-item-name-pos-before,
.fef-item-name-pos-after{ flex-direction:row; align-items:center; }
.fef-item-name-pos-above,
.fef-item-name-pos-below{ flex-direction:column; }

.fef-item-name-pos-before.fef-item-name-align-left,
.fef-item-name-pos-after.fef-item-name-align-left{ justify-content:flex-start; }
.fef-item-name-pos-before.fef-item-name-align-center,
.fef-item-name-pos-after.fef-item-name-align-center{ justify-content:center; }
.fef-item-name-pos-before.fef-item-name-align-right,
.fef-item-name-pos-after.fef-item-name-align-right{ justify-content:flex-end; }

.fef-item-name-pos-above.fef-item-name-align-left,
.fef-item-name-pos-below.fef-item-name-align-left{ align-items:flex-start; }
.fef-item-name-pos-above.fef-item-name-align-center,
.fef-item-name-pos-below.fef-item-name-align-center{ align-items:center; }
.fef-item-name-pos-above.fef-item-name-align-right,
.fef-item-name-pos-below.fef-item-name-align-right{ align-items:flex-end; }
.fef-basket-item-price{ font-size:13px; font-weight:700; color:#2e7d32; margin-bottom:6px; }
.fef-basket-item-price-symbol,
.fef-basket-item-price-amount{ display:inline-block; }
.fef-basket-item-title-link{ color:inherit; text-decoration:none; }
.fef-basket-item-title-link:hover{ text-decoration:underline; }
.fef-basket-item-qty{ width:96px; height:34px; margin-top:2px; }
.fef-basket-item-qty-readonly{ font-size:13px; color:#666; }
.fef-basket-item-remove{
    border:none; background:transparent; cursor:pointer;
    color:#999; font-size:14px; line-height:1; padding:6px; flex-shrink:0;
    display:inline-flex; align-items:center; justify-content:center;
    box-sizing:border-box;
    transition:color .15s, background .15s;
}
.fef-basket-item-remove:hover{ color:#e53935; }
.fef-basket-item-remove svg{ width:1em; height:1em; fill:currentColor; }

/* ── Footer / totals ── */
.fef-basket-footer{ flex-shrink:0; padding:14px 18px 18px; border-top:1px solid #eee; }
.fef-basket-totals-row{
    display:flex; align-items:center; justify-content:space-between;
    font-size:14px; padding:4px 0;
}
.fef-basket-total-row{ margin-top:4px; }
.fef-basket-total-amount{ font-size:20px; font-weight:700; }

.fef-basket-actions{ margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.fef-basket-proceed{
    width:100%; height:48px;
    border:none; border-radius:8px;
    background:#2e7d32; color:#fff;
    font-size:15px; font-weight:700;
    cursor:pointer;
    box-sizing:border-box;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.fef-basket-proceed:hover{ background:#1b5e20; }
.fef-basket-proceed-icon{ display:inline-flex; align-items:center; justify-content:center; line-height:1; flex-shrink:0; }
.fef-basket-proceed-icon svg,
.fef-basket-proceed-icon i{ width:1em; height:1em; fill:currentColor; }
.fef-basket-secondary-actions{ display:flex; gap:8px; justify-content:center; }
.fef-basket-secondary-actions.fef-clear-pos-left{ justify-content:flex-start; }
.fef-basket-secondary-actions.fef-clear-pos-center{ justify-content:center; }
.fef-basket-secondary-actions.fef-clear-pos-right{ justify-content:flex-end; }
.fef-basket-clear, .fef-basket-continue{
    border:none; background:transparent;
    font-size:13px; color:#777;
    cursor:pointer; text-decoration:underline;
    padding:4px 8px;
}
.fef-basket-clear:hover, .fef-basket-continue:hover{ color:#222; }

/* Page mode never needs the overlay or fixed positioning quirks */
.fef-basket-mode-page .fef-basket-overlay{ display:none; }
.fef-basket-mode-page .fef-basket-body{ max-height:none; }

/* ── Panel form embed (Proceed → "Replace Panel Records with Form") ── */
.fef-basket-body-form{ padding:18px; }
.fef-basket-form-embed{ min-height:80px; }
.fef-basket-form-loading{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    min-height:180px;
    text-align:center;
    color:#888;
    font-size:14px;
}
.fef-basket-form-loading .fef-basket-form-spinner{
    width:32px;
    height:32px;
    border:3px solid rgba(46,125,50,.18);
    border-top-color:#2e7d32;
    border-radius:50%;
    animation:fef-basket-spin .8s linear infinite;
}
@keyframes fef-basket-spin{ to{ transform:rotate(360deg); } }
.fef-basket-form-error{
    text-align:center; color:#b91c1c; font-size:14px;
    padding:24px 10px; background:#fef2f2; border-radius:8px;
}