﻿/* ==========================================================================
   motion.css
   الحركة واللمسات الجمالية المشتركة لكل الصفحات. يُحمَّل بعد responsive.css.

   Same convention as responsive.css: every selector starts with :root so it
   wins over style.css even when a view links it again inside <body>, and
   !important is used only against inline style="" or an existing !important.

   Rules of the layer:
     - the page chrome (header, footer, page bar) never animates on load,
       because every navigation is a full page load;
     - anything inside .divBids / .MostVisit is rebuilt by SignalR every
       second, so it gets no :hover effect and no plain entrance animation
       (motion.js drives those two cases with a negative animation-delay);
     - prefers-reduced-motion is already handled globally in responsive.css.
   ========================================================================== */

:root {
    --mo-gold: #b7872e;
    --mo-gold-soft: #d9bd84;
    --mo-green: #00522a;
    --mo-green-deep: #003d20;
    --mo-sand: #f6efe2;
    --mo-ease: cubic-bezier(.2, .7, .2, 1);
    --mo-spring: cubic-bezier(.34, 1.56, .64, 1);
    --mo-fast: .18s;
    --mo-mid: .32s;
    /* height of the bar once the page is scrolled; anything pinned under it uses this */
    --mo-header-scrolled: 56px;
    /* shadows are tinted with the brand gold instead of neutral grey */
    --mo-shadow-1: 0 2px 6px rgba(92, 62, 10, .10), 0 12px 24px -14px rgba(92, 62, 10, .35);
    --mo-shadow-2: 0 6px 14px rgba(92, 62, 10, .12), 0 26px 44px -22px rgba(92, 62, 10, .45);
    --mo-ring: 0 0 0 3px rgba(183, 135, 46, .32);
}

:root ::selection {
    background: rgba(183, 135, 46, .28);
}


/* --------------------------------------------------------------------------
   1. Keyframes
   -------------------------------------------------------------------------- */

@keyframes mo-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes mo-logo-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.94);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* chips slide in from the reading side (right, the page is RTL) */
@keyframes mo-chip-in {
    from {
        opacity: 0;
        transform: translateX(28px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes mo-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* a bid landed: the price jumps and a gold ring leaves it */
@keyframes mo-bump {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(183, 135, 46, .55);
    }

    30% {
        transform: scale(1.09);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 18px rgba(183, 135, 46, 0);
    }
}

@keyframes mo-gavel {
    0% {
        transform: rotate(0);
    }

    35% {
        transform: rotate(28deg);
    }

    60% {
        transform: rotate(-16deg);
    }

    100% {
        transform: rotate(0);
    }
}


/* --------------------------------------------------------------------------
   2. Header and main menu
   -------------------------------------------------------------------------- */

:root .header.landing_page {
    box-shadow: 0 2px 0 var(--mo-gold), 0 16px 30px -20px rgba(92, 62, 10, .7);
    transition: height var(--mo-mid) var(--mo-ease), min-height var(--mo-mid) var(--mo-ease), padding var(--mo-mid) var(--mo-ease), background-color var(--mo-mid) ease, box-shadow var(--mo-mid) ease;
}

    /* set by motion.js once the page is scrolled: the bar gets shorter and
       lets the page show through, so it takes less of the screen while reading */
    :root .header.landing_page.mo-scrolled {
        height: var(--mo-header-scrolled);
        background: rgba(255, 255, 255, .9);
        box-shadow: 0 1px 0 var(--mo-gold), 0 14px 26px -18px rgba(92, 62, 10, .8);
    }

    :root .header.landing_page .hidden-sm img,
    :root .header.landing_page .header_auth .btn {
        transition: height var(--mo-mid) var(--mo-ease), min-height var(--mo-mid) var(--mo-ease), padding var(--mo-mid) var(--mo-ease), line-height var(--mo-mid) var(--mo-ease);
    }

@media (min-width: 1200px) {
    /* not below 1200px: the menu sheet inside the header is position: fixed,
       and a backdrop-filter would make the header its containing block */
    :root .header.landing_page.mo-scrolled {
        -webkit-backdrop-filter: saturate(1.4) blur(12px);
        backdrop-filter: saturate(1.4) blur(12px);
    }

        /* the logo keeps its size: a narrower logo would slide the whole menu sideways */
        :root .header.landing_page.mo-scrolled .header_auth .btn {
            padding-top: 3px;
            padding-bottom: 3px;
        }
}

@media (max-width: 1199.98px) {
    :root .header.landing_page.mo-scrolled {
        height: auto;
        min-height: 52px;
        padding: 3px 0;
        /* no blur here, so the bar stays solid and the page does not ghost through */
        background: #fff;
    }

        :root .header.landing_page.mo-scrolled .hidden-sm img {
            height: 36px;
        }

        /* the menu sheet and the bell / profile menus follow the shorter bar */
        :root .header.landing_page.mo-scrolled .navbar-collapse {
            top: calc(var(--mo-header-scrolled) + 8px);
            max-height: calc(100vh - var(--mo-header-scrolled) - 24px);
            max-height: calc(100dvh - var(--mo-header-scrolled) - 24px);
        }

        :root .header.landing_page.mo-scrolled .notification .dropdown-menu,
        :root .header.landing_page.mo-scrolled .profile_log .dropdown-menu {
            top: calc(var(--mo-header-scrolled) + 8px) !important;
        }
}

:root .header.landing_page a > img {
    transition: opacity var(--mo-fast) ease;
}

:root .header.landing_page a:hover > img {
    opacity: .82;
}

@media (min-width: 1200px) {
    /* the menu used to flip in over 2.4s on every page; it is usable at once now */
    :root .header .navbar-nav > .nav-item[data-aos],
    :root .header .dashboard_log[data-aos] {
        transition-duration: .4s !important;
        transition-delay: 0s !important;
    }

    :root .header .navbar-nav > .nav-item[data-aos]:nth-child(2) {
        transition-delay: .04s !important;
    }

    :root .header .navbar-nav > .nav-item[data-aos]:nth-child(3) {
        transition-delay: .08s !important;
    }

    :root .header .navbar-nav > .nav-item[data-aos]:nth-child(4) {
        transition-delay: .12s !important;
    }

    :root .header .navbar-nav > .nav-item[data-aos]:nth-child(5) {
        transition-delay: .16s !important;
    }

    :root .header .navbar-nav > .nav-item[data-aos]:nth-child(6) {
        transition-delay: .2s !important;
    }

    :root .header .navbar-nav > .nav-item[data-aos]:nth-child(n+7) {
        transition-delay: .24s !important;
    }

    :root .header .navbar-nav > .nav-item > .nav-link {
        position: relative;
        transition: color var(--mo-fast) ease;
    }

        /* gold rule that grows from the right edge of the word */
        :root .header .navbar-nav > .nav-item > .nav-link::after {
            content: "";
            position: absolute;
            right: 12px;
            left: 12px;
            bottom: -9px;
            height: 2px;
            border-radius: 2px;
            background: var(--mo-gold);
            transform: scaleX(0);
            transform-origin: right center;
            transition: transform var(--mo-mid) var(--mo-ease);
        }

        :root .header .navbar-nav > .nav-item > .nav-link:hover::after,
        :root .header .navbar-nav > .nav-item > .nav-link:focus-visible::after,
        :root .header .navbar-nav > .nav-item > .nav-link.active::after {
            transform: scaleX(1);
        }

        :root .header .navbar-nav > .nav-item > .nav-link:hover {
            color: var(--mo-gold);
        }
}

:root .dropdown-menu.show {
    animation: mo-fade .16s ease both;
}

:root .dropdown-item {
    transition: background-color var(--mo-fast) ease, color var(--mo-fast) ease;
}


/* --------------------------------------------------------------------------
   3. Buttons and links
   -------------------------------------------------------------------------- */

:root a {
    transition: color var(--mo-fast) ease;
}

:root .btn {
    transition: transform var(--mo-fast) var(--mo-ease), box-shadow var(--mo-fast) ease, background-color var(--mo-fast) ease, border-color var(--mo-fast) ease, color var(--mo-fast) ease, filter var(--mo-fast) ease;
}

    :root .btn:not(:disabled):not(.disabled):hover {
        transform: translateY(-1px);
        box-shadow: var(--mo-shadow-1);
    }

    :root .btn:not(:disabled):not(.disabled):active {
        transform: translateY(0) scale(.98);
        box-shadow: none;
        transition-duration: .06s;
    }

    /* the theme focus ring was purple */
    :root .btn:focus,
    :root .btn.focus {
        box-shadow: var(--mo-ring);
    }

:root .btn-green:hover,
:root .btn-green:focus {
    color: #fff;
    background-color: var(--mo-green-deep);
}

:root .btn-bid:hover,
:root .btn-primary-bid:hover,
:root .btn-danger-bid:hover {
    filter: brightness(1.08);
}

/* the gavel strikes when its button is hovered or pressed */
:root .btn .la-gavel,
:root .btn .fa-gavel {
    display: inline-block;
    transform-origin: 70% 75%;
}

:root .btn:hover .la-gavel,
:root .btn:hover .fa-gavel,
:root .btn:focus-visible .la-gavel {
    animation: mo-gavel .5s var(--mo-ease);
}

/* live lists are rebuilt every second: a hover effect would restart each time */
:root .divBids .btn,
:root .MostVisit .btn {
    transition: none;
}

    :root .divBids .btn:hover,
    :root .MostVisit .btn:hover,
    :root .divBids .btn:active,
    :root .MostVisit .btn:active {
        transform: none;
        filter: none;
        box-shadow: 0 6px 14px -6px rgba(60, 40, 6, .55);
    }

        :root .divBids .btn:hover .la-gavel,
        :root .MostVisit .btn:hover .la-gavel {
            animation: none;
        }

:root .login100-form-btn {
    transition: transform var(--mo-fast) var(--mo-ease), box-shadow var(--mo-fast) ease, color var(--mo-fast) ease, filter var(--mo-fast) ease;
}

    :root .login100-form-btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--mo-shadow-1);
        filter: saturate(1.15);
    }

    :root .login100-form-btn:active {
        transform: scale(.985);
        box-shadow: none;
    }

    :root .login100-form-btn:focus-visible {
        outline: 3px solid var(--mo-green);
        outline-offset: 2px;
    }

:root .page-link {
    transition: background-color var(--mo-fast) ease, color var(--mo-fast) ease, border-color var(--mo-fast) ease;
}

    :root .page-link:hover {
        color: var(--mo-green);
        background-color: var(--mo-sand);
        border-color: var(--mo-gold-soft);
    }

    :root .page-link:focus {
        box-shadow: var(--mo-ring);
    }


/* --------------------------------------------------------------------------
   4. Forms
   -------------------------------------------------------------------------- */

:root .form-control,
:root .input100,
:root .select2-container--default .select2-selection--single,
:root textarea {
    transition: border-color var(--mo-fast) ease, box-shadow var(--mo-fast) ease, background-color var(--mo-fast) ease;
}

    :root .form-control:focus,
    :root textarea:focus,
    :root .select2-container--default.select2-container--focus .select2-selection--single,
    :root .select2-container--default.select2-container--open .select2-selection--single {
        border-color: var(--mo-gold) !important;
        box-shadow: var(--mo-ring) !important;
        outline: 0 !important;
    }

:root .input-group-text {
    transition: border-color var(--mo-fast) ease;
}

:root .input-group:focus-within .input-group-text {
    border-color: var(--mo-gold) !important;
}

/* sign-in fields: a steady ring instead of the orange burst */
:root .input100:focus {
        box-shadow: 0 0 0 2px var(--mo-gold);
    }

        :root .input100:focus + .focus-input100 {
            animation: none;
        }

:root .field-validation-error,
:root .error-label:not(:empty) {
    animation: mo-fade .25s ease both;
}

:root .alert-dismissible {
    animation: mo-rise .4s var(--mo-ease) both;
}


/* --------------------------------------------------------------------------
   5. Landing page: one load sequence (logo, the two titles, then ranks 1-2-3)
   -------------------------------------------------------------------------- */

:root #intro .intro-content img {
    animation: mo-logo-in .9s var(--mo-ease) both;
}

:root #intro .top-Description {
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--mo-shadow-1);
    animation: mo-rise .6s var(--mo-ease) .3s both;
}

:root #intro .top-contacts-container {
    animation: mo-chip-in .6s var(--mo-ease) both;
}

/* rank 1 sits alone in the first row, ranks 2 and 3 share the second */
:root #intro .col-xl-12:first-child > .row > .top-contacts-container {
    animation-delay: .5s;
}

:root #intro .col-xl-12 + .col-xl-12 > .row > .top-contacts-container:nth-child(1) {
    animation-delay: .62s;
}

:root #intro .col-xl-12 + .col-xl-12 > .row > .top-contacts-container:nth-child(2) {
    animation-delay: .74s;
}

    /* the circle itself must never get a transform: the name bar and the flag
       inside it are absolutely positioned against .top-contacts, and a transform
       here would make the 55px circle their containing block */
    :root .top-contacts .top-contacts-image {
        transition: box-shadow var(--mo-mid) ease;
    }

        :root .top-contacts .top-contacts-image > .person-img:not(.nationality-Image) {
            transition: transform var(--mo-mid) var(--mo-ease);
        }

    :root .top-contacts .top-contacts-name {
        transition: background-color var(--mo-mid) ease, color var(--mo-mid) ease;
    }

    /* style.css points this background at /Content/Content/... (a 404 on every
       page load); the badge is drawn by the <img class="bg-image"> inside anyway */
    :root .top-contacts .top-contacts-number {
        background-image: none;
        transition: transform var(--mo-mid) var(--mo-ease);
    }

    :root .top-contacts:hover .top-contacts-image,
    :root .top-contacts:focus-visible .top-contacts-image {
        box-shadow: 0 0 0 3px rgba(183, 135, 46, .28);
    }

        :root .top-contacts:hover .top-contacts-image > .person-img:not(.nationality-Image),
        :root .top-contacts:focus-visible .top-contacts-image > .person-img:not(.nationality-Image) {
            transform: scale(1.06);
        }

    :root .top-contacts:hover .top-contacts-name,
    :root .top-contacts:focus-visible .top-contacts-name {
        background: var(--mo-gold);
        color: #fff;
    }

    :root .top-contacts:hover .top-contacts-number,
    :root .top-contacts:focus-visible .top-contacts-number {
        transform: translateY(-2px);
    }

    :root .top-contacts:focus-visible {
        outline: 0;
    }


/* --------------------------------------------------------------------------
   6. Auction and market lists
   -------------------------------------------------------------------------- */

/* category box */
@media (min-width: 1200px) {
    :root .col-xl-2.col-md-4 > .card {
        border-radius: var(--ui-r-box) !important;
        overflow: hidden;
        box-shadow: var(--mo-shadow-1);
    }

        :root .col-xl-2.col-md-4 > .card > .card-body {
            padding-top: 6px !important;
            padding-bottom: 6px !important;
            border-radius: 0 0 var(--ui-r-box) var(--ui-r-box) !important;
            background: #fff;
        }
}

:root .col-xl-2.col-md-4 > .card > .card-body [id^="nav"] {
    transition: background-color var(--mo-fast) ease, border-color var(--mo-fast) ease, color var(--mo-fast) ease;
}

    :root .col-xl-2.col-md-4 > .card > .card-body [id^="nav"]:hover {
        border-color: var(--mo-gold) !important;
    }

    :root .col-xl-2.col-md-4 > .card > .card-body [id^="nav"] > .nav-link:focus-visible {
        outline: 3px solid var(--mo-green);
        outline-offset: 2px;
        border-radius: var(--ui-r-ctl);
    }

    :root .col-xl-2.col-md-4 > .card > .card-body [id^="nav"][class*="active-"] {
        border-color: transparent !important;
    }

/* the divider fades out at both ends instead of a hard grey bar */
:root .hr_sidebar {
    border-left: 0;
    background: linear-gradient(to bottom, rgba(183, 135, 46, 0), var(--mo-gold) 18%, var(--mo-gold) 82%, rgba(183, 135, 46, 0));
}

/* auction cards */
:root .divBids .card,
:root .MostVisit .card {
    border: 0;
    border-radius: var(--ui-r-box);
    background: none;
    box-shadow: var(--mo-shadow-1);
}

:root .divBids .card-body.bid-shortInfo-card,
:root .MostVisit .card-body.bid-shortInfo-card {
    padding: 14px 12px 0;
    border-color: rgba(183, 135, 46, .45) !important;
}

:root .divBids .card-body.bid-shortInfo-card {
    border-radius: var(--ui-r-box) !important;
}

    :root .bid-shortInfo-card > h4 {
        border-bottom-color: rgba(60, 40, 6, .35) !important;
    }

    /* countdown tiles */
    :root .bid-shortInfo-card .reminig > div {
        padding: 5px 0 3px !important;
        border-radius: var(--ui-r-ctl);
        box-shadow: inset 0 0 0 1px rgba(183, 135, 46, .22);
    }

        :root .bid-shortInfo-card .reminig > div > span:first-child {
            font-variant-numeric: tabular-nums;
        }

    :root .bid-shortInfo-card > .row {
        margin-bottom: 8px;
    }

    :root .bid-shortInfo-card > h3:not(.text-danger-bid) > span:first-child {
        display: inline-block;
        padding: 0 8px;
        border-radius: var(--ui-r-ctl);
        font-variant-numeric: tabular-nums;
    }

    :root .bid-shortInfo-card > .btn {
        box-shadow: 0 6px 14px -6px rgba(60, 40, 6, .55);
    }

/* this card's body is square by its inline style; leave room for the hanging button */
:root .MostVisit .card {
    border-radius: 0;
    margin-top: 18px;
    margin-bottom: 32px;
}

/* first paint of the grid: motion.js adds .mo-enter and keeps --mo-elapsed in
   step, so a rebuild in the middle of the sequence resumes instead of restarting */
:root .divBids.mo-enter > [class*="col-"] {
    animation: mo-rise .5s var(--mo-ease) both;
    animation-delay: calc(var(--mo-i, 7) * 70ms - var(--mo-elapsed, 0ms));
}

    :root .divBids.mo-enter > [class*="col-"]:nth-child(1) {
        --mo-i: 0;
    }

    :root .divBids.mo-enter > [class*="col-"]:nth-child(2) {
        --mo-i: 1;
    }

    :root .divBids.mo-enter > [class*="col-"]:nth-child(3) {
        --mo-i: 2;
    }

    :root .divBids.mo-enter > [class*="col-"]:nth-child(4) {
        --mo-i: 3;
    }

    :root .divBids.mo-enter > [class*="col-"]:nth-child(5) {
        --mo-i: 4;
    }

    :root .divBids.mo-enter > [class*="col-"]:nth-child(6) {
        --mo-i: 5;
    }

    :root .divBids.mo-enter > [class*="col-"]:nth-child(7) {
        --mo-i: 6;
    }

/* price changed (class and animation-delay are set by motion.js) */
:root .mo-bump {
    animation: mo-bump .9s var(--mo-ease) both;
}


/* --------------------------------------------------------------------------
   7. Auction details
   -------------------------------------------------------------------------- */

:root #lblBidMaxValue {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 -3px 0 rgba(183, 135, 46, .18);
}

:root #divBidEnd-time,
:root #spCountOfBids {
    font-variant-numeric: tabular-nums;
}

/* bidding panel */
:root .card-body:has(> form #lblBidMaxValue) {
    border-radius: var(--ui-r-box) !important;
    border-color: rgba(183, 135, 46, .6) !important;
    box-shadow: var(--mo-shadow-2);
}

:root .BidValue-btn {
    transition: transform var(--mo-fast) var(--mo-ease), box-shadow var(--mo-fast) ease, background-color var(--mo-fast) ease, color var(--mo-fast) ease;
}

    :root .BidValue-btn:active {
        transform: scale(.96);
    }

    :root .BidValue-btn.active {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .75), 0 8px 16px -8px rgba(0, 61, 32, .8);
    }

:root .card-header.bid-name {
    box-shadow: var(--mo-shadow-1);
}


/* --------------------------------------------------------------------------
   8. Member area shell
   -------------------------------------------------------------------------- */

:root body > .page-title {
    background: linear-gradient(to left, #b7872e, #cda453) !important;
    box-shadow: var(--mo-shadow-1);
}

    :root body > .page-title:not(:has(*)) {
        box-shadow: none;
    }

    :root body > .page-title a {
        transition: opacity var(--mo-fast) ease;
    }

        :root body > .page-title a:hover {
            opacity: .78;
        }

:root .rsp-user-shell > .signin .card-body {
    box-shadow: var(--mo-shadow-1);
}

:root .contact .top-contacts-image {
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .55);
}

:root .custom-btn-bid {
    transition: transform var(--mo-mid) var(--mo-spring), box-shadow var(--mo-mid) ease, background-image var(--mo-mid) ease;
}

    :root .custom-btn-bid img {
        transition: transform var(--mo-mid) var(--mo-spring);
    }

    :root .custom-btn-bid .title {
        transition: color var(--mo-fast) ease;
    }

    :root .custom-btn-bid.active {
        box-shadow: 0 0 0 2px var(--mo-gold), var(--mo-shadow-1);
    }

    :root .custom-btn-bid > a {
        display: block;
        height: 100%;
        border-radius: inherit;
    }

        :root .custom-btn-bid > a:focus-visible {
            outline: 3px solid var(--mo-green);
            outline-offset: 2px;
        }

@media (hover: hover) and (min-width: 992px) {
    :root .custom-btn-bid:hover {
        box-shadow: var(--mo-shadow-2);
    }

        :root .custom-btn-bid:hover img {
            transform: scale(1.12) translateY(-2px);
        }

        :root .custom-btn-bid:hover .title {
            color: var(--mo-green);
        }
}

:root .custom-btn-bid:active {
    transform: scale(.96);
    transition-duration: .08s;
}


/* --------------------------------------------------------------------------
   9. Tables, sign-in card, footer
   -------------------------------------------------------------------------- */

:root .table tbody tr {
    transition: background-color var(--mo-fast) ease;
}

@media (hover: hover) {
    :root .table tbody tr:hover {
        background-color: rgba(183, 135, 46, .07);
    }
}

:root .center-form .form-content {
    box-shadow: var(--mo-shadow-2) !important;
}

:root .symbol-input100 .fa {
    border-left-color: rgba(60, 40, 6, .35);
}

:root .firtpage-footer a {
    border-radius: 50%;
    transition: transform var(--mo-mid) var(--mo-spring), background-color var(--mo-fast) ease;
}

    :root .firtpage-footer a:hover {
        transform: translateY(-3px);
        background-color: rgba(255, 255, 255, .22);
    }


/* --------------------------------------------------------------------------
   10. Reduced motion (responsive.css already cuts every duration to ~0)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    :root *,
    :root *::before,
    :root *::after {
        animation-delay: 0s !important;
        transition-delay: 0s !important;
    }

    :root .btn:hover,
    :root .login100-form-btn:hover,
    :root .custom-btn-bid:hover,
    :root .firtpage-footer a:hover,
    :root .top-contacts:hover .top-contacts-image,
    :root .top-contacts:hover .top-contacts-number {
        transform: none !important;
    }
}

@media print {
    :root *,
    :root *::before,
    :root *::after {
        animation: none !important;
    }
}
