/* شريط رحلة الإخصاب - Jannah Child Theme */

/* عزل مظهر الشريط عن تنسيقات القالب */
.rj,
.rj *,
.rj *::before,
.rj *::after {
    box-sizing: border-box;
}

.rj {
    --rj-bg: #ffffff;
    --rj-pembe: #ff5099;
    --rj-acik: #ffd0e3;
    --rj-acik2: #fff0f6;

    direction: rtl;
    position: fixed !important;
    z-index: 999999 !important;
    inset-inline: 12px !important;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;

    display: flex !important;
    align-items: center !important;
    gap: 12px;
    width: auto !important;
    max-width: 700px !important;
    height: 45px !important;
    margin-inline: auto !important;
    padding: 6px 8px 6px 18px !important;

    border: 1px solid rgba(255, 80, 153, 0.12) !important;
    border-radius: 999px !important;
    background: var(--rj-bg) !important;
    box-shadow: 0 12px 32px rgba(40, 18, 110, 0.15), 0 0 0 1px rgba(109, 69, 240, 0.05) !important;

    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden;
    transform: translateY(calc(100% + 24px));
    transition: opacity .3s ease, transform .4s cubic-bezier(.2, .8, .2, 1), visibility .3s;
}

.dark-skin .rj {
    --rj-bg: #1e1736;
    --rj-acik: #59405a;
    --rj-acik2: #302342;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

.rj.on {
    opacity: 1 !important;
    visibility: visible;
    transform: translateY(0);
}

@media (min-width: 1024px) {
    .rj {
        bottom: 24px !important;
    }
}

/* عناصر المسار */
.rj .rj-track {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.rj .rj-run {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    display: block;
    width: calc(100% - 44px);
    height: 100%;
    will-change: transform;
}

.rj .rj-wake {
    position: absolute;
    top: calc(50% - 1.5px);
    inset-inline-end: calc(100% - 22px);
    width: 100vw;
    height: 3px;
    border-radius: 3px;
    background: var(--rj-acik);
}

.rj .rj-sperm {
    position: absolute;
    top: calc(50% - 11px);
    inset-inline-start: 0;
    display: block;
    width: 44px;
    height: 22px;
}

.rj .rj-in,
.rj .rj-swim {
    display: block;
    width: 100%;
    height: 100%;
}

.rj .rj-swim {
    transform-origin: 78% 50%;
}

.rj .rj-in:dir(rtl) {
    scale: -1 1;
}

@media (prefers-reduced-motion: no-preference) {
    .rj .rj-swim {
        animation: rj-swim .6s ease-in-out infinite alternate;
    }

    .rj:not(.on) .rj-swim,
    .rj.met .rj-swim {
        animation-play-state: paused;
    }
}

@keyframes rj-swim {
    0% { transform: rotate(-7deg) skewY(5deg); }
    100% { transform: rotate(7deg) skewY(-5deg); }
}

/* حجم SVG مضبوط بشكل مستقل لمنع تضخمه بسبب CSS القالب */
.rj svg {
    display: block !important;
    max-width: none !important;
    overflow: visible !important;
}

.rj .rj-sperm svg {
    width: 44px !important;
    height: 22px !important;
}

.rj .rj-tail {
    fill: none !important;
    stroke: var(--rj-pembe) !important;
    stroke-width: 2.4 !important;
    stroke-linecap: round !important;
}

.rj .rj-head {
    fill: var(--rj-pembe) !important;
}

.rj .rj-cap {
    fill: var(--rj-acik) !important;
}

/* البويضة */
.rj .rj-egg {
    position: relative;
    display: block;
    flex: 0 0 40px;
    width: 40px !important;
    min-width: 40px;
    height: 40px !important;
}

.rj .rj-ovum {
    position: absolute;
    inset: 0;
    width: 40px !important;
    height: 40px !important;
    opacity: 1;
    transform: scale(1);
}

.rj .rj-cor {
    fill: var(--rj-acik) !important;
}

.rj .rj-mem {
    fill: var(--rj-bg) !important;
    stroke: var(--rj-pembe) !important;
    stroke-width: 2.5 !important;
}

.rj .rj-cyt {
    fill: var(--rj-acik2) !important;
}

.rj .rj-nuc {
    fill: var(--rj-acik) !important;
}

/* رسم الجنين النهائي */
.rj .rj-logo {
    position: absolute;
    left: 0;
    top: 6%;
    width: 40px !important;
    height: 40px !important;
    opacity: 0;
    transform: scale(.5);
}

.rj .rj-lheart {
    fill: var(--rj-pembe) !important;
}

.rj .rj-lfetus {
    fill: #ffffff !important;
    opacity: 0;
}

.rj .rj-lcord {
    fill: none !important;
    stroke: #ffffff !important;
    stroke-linecap: round !important;
    stroke-dasharray: 100 200;
    stroke-dashoffset: 100;
}

/* حالة اكتمال الإخصاب */
.rj.met .rj-sperm {
    opacity: 0;
    transition: opacity .3s;
}

.rj.met .rj-wake {
    transform: translateX(34px);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

.rj:dir(rtl).met .rj-wake {
    transform: translateX(-34px);
}

.rj.met .rj-cyt {
    fill: var(--rj-acik) !important;
}

.rj.met .rj-nuc {
    fill: var(--rj-pembe) !important;
}

.rj.met .rj-ovum {
    opacity: 0;
    transform: scale(.6);
    transition: opacity .4s .9s, transform .5s .9s;
}

.rj.met .rj-logo {
    opacity: 1;
    transform: none;
    transition: opacity .35s .9s, transform .7s .9s cubic-bezier(.3, 1.5, .5, 1);
}

.rj.met .rj-lfetus {
    opacity: 1;
    transition: opacity .45s 1.3s;
}

.rj.met .rj-lcord {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .8s 1.5s cubic-bezier(.4, 0, .2, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .rj.met .rj-egg {
        animation: rj-beat .6s .25s cubic-bezier(.3, .7, .4, 1), rj-beat 1.1s 2.4s cubic-bezier(.3, .7, .4, 1);
    }
}

@keyframes rj-beat {
    0%, 100% { transform: none; }
    14% { transform: scale(1.16); }
    28% { transform: scale(.97); }
    42% { transform: scale(1.1); }
    60% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .rj,
    .rj *,
    .rj.met * {
        transition: none !important;
        animation: none !important;
    }
}
