/* ==========================
   CALCULATOR
========================== */

.algo-calculator {
    position: relative !important;
    overflow: visible !important;

    transform: translateX(0);

    transition:
        transform .5s cubic-bezier(.22,.8,.32,1) !important;

    will-change: transform;
}


/* ==========================
   HTML WIDGET WRAPPER
   لا يأخذ مساحة داخل Flexbox
========================== */

.algo-drawer-widget {
    position: static !important;

    width: 0 !important;
    height: 0 !important;

    min-width: 0 !important;
    min-height: 0 !important;

    flex: 0 0 0 !important;

    padding: 0 !important;
    margin: 0 !important;
}

.algo-drawer-widget > .elementor-widget-container {
    position: static !important;
}


/* ==========================
   HANDLE
========================== */

.algo-drawer-handle {
    position: absolute !important;

    /* الحافة اليمنى للـ Calculator */
    left: 100% !important;
    right: auto !important;


    /* منتصف الـ Calculator رأسيًا */
    top: 50% !important;

    transform: translateY(-50%) !important;

    width: 40px;
    height: 170px;

    margin: 0 !important;
    padding: 25px 5px!important;

    border: 0;

    border-radius: 0 12px 12px 0!important;

    background: linear-gradient(
        180deg,
        #0EB6D2 0%,
        #0097A7 100%
    );

    box-shadow: 4px 0 14px rgba(0,151,167,.25);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: space-between;

    cursor: pointer;

    z-index: 99999;

    color: #fff;
}


/* CALCULATOR النص */

.algo-drawer-label {
    writing-mode: vertical-rl;

    transform: rotate(180deg);

    white-space: nowrap;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;

    line-height: 1;

    color: #fff;
}


.algo-drawer-arrow {
    font-size: 22px;

    line-height: 1;

    color: #fff;

    transition: transform .3s ease;
}


/* ==========================
   CLOSED
========================== */

.algo-calculator.is-closed {
    transform: translateX(var(--drawer-close-x)) !important;
}

.algo-calculator.is-closed .algo-drawer-arrow {
    transform: rotate(180deg);
}
.algo-goal{
    cursor:pointer;
    transition:.25s ease;
}

.algo-goal.active{

    background:linear-gradient(
        180deg,
        #0EB6D2 0%,
        #0097A7 100%
    ) !important;

    transform:translateY(-2px);

    box-shadow:
        0 6px 18px rgba(14,182,210,.38)!important;

    border-color:transparent;
}

.algo-goal.active *{
    color:#fff !important;
}


.algo-goal.active .algo-check{

    opacity:1;

    visibility:visible;

}
/* =========================================
   Slider
========================================= */
.algo-slider{
    --progress:0%;

    -webkit-appearance:none;
    appearance:none;

    width:100%;
    height:6px;

    border:none;
    outline:none;

    border-radius:999px;

    cursor:pointer;

    background:
        linear-gradient(
            to right,
            #11C5E4 0%,
            #11C5E4 var(--progress),
            #2F3847 var(--progress),
            #2F3847 100%
        );
}

/* Track */

.algo-slider::-webkit-slider-runnable-track{
    height:6px;
    background:transparent;
    border-radius:999px;
}

/* Thumb */

.algo-slider::-webkit-slider-thumb{
    -webkit-appearance:none;
    appearance:none;

    width:20px;
    height:20px;

    border-radius:50%;

    background:#11C5E4;

    border:3px solid #fff;

    box-shadow:
        0 0 0 5px rgba(17,197,228,.20);

    cursor:pointer;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

    margin-top:-7px;

}

.algo-slider:hover::-webkit-slider-thumb{
    transform:scale(1.08);
}

.algo-slider:active::-webkit-slider-thumb{
    transform:scale(1.15);
}



.algo-controls{
    display:flex;
    gap:24px;
}

.algo-investment,
.algo-years{
    flex:1;
}

.is-hidden{
    display:none !important;
}
.algo-calc__chart {
    position: relative;
}

.algo-calc__mo-badge {
    position: absolute;
    top: 10px;
    left: 10px;

    z-index: 10;

    display: none;

    flex-direction: column;
    gap: 2px;

    padding: 7px 12px;

    background: rgba(255,255,255,.96);

    border: 1.5px solid rgba(14,182,210,.4);
    border-radius: 10px;
}

.algo-calc__mo-badge.show {
    display: flex;
}

.algo-calc__mo-lbl {
    font-size: 9px;
    font-weight: 700;
    color: #9CA3AF;
    letter-spacing: .04em;
}

.algo-calc__mo-val {
    font-size: 18px;
    line-height: 1.1;
    font-weight: 900;
    color: #16A34A;
}
.algo-result-arrow {
    animation: algoArrowBounce 1.4s ease-in-out infinite;
    will-change: transform;
}

@keyframes algoArrowBounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(7px);
    }
}
/* =========================================
   Calculator Drawer
========================================= */

.algo-calculator {
    position: relative;

    transform: translateX(0);

    transition:
        transform .45s cubic-bezier(.25,.85,.3,1) !important;

    will-change: transform;
    overflow: visible !important;
}


/* CLOSED
   نخفي عرض الحاسبة بالكامل ناحية اليسار */
.algo-calculator.is-closed {
    transform: translateX(-100%) !important;
}


/* =========================================
   Handle
========================================= */

.drawer-handle {
    position: absolute !important;

    top: 50% !important;

    /* ملاصق للحافة اليمنى للـ Calculator */
    left: 100% !important;
    right: auto !important;

    transform: translateY(-50%) !important;

    z-index: 9999;

    cursor: pointer;
    user-select: none;

    margin: 0 !important;

    transition:
        box-shadow .3s ease !important;
}
}