/* ==========================================================================
   Hover effects - site wide (public pages + user dashboard)
   --------------------------------------------------------------------------
   Loaded last, from frontend/accxone/include/__head.blade.php.

   Rules of thumb used here:
   - Things you can click get a clear response (lift, colour, shadow).
   - Information cards only get a soft border/shadow, so they don't look
     like buttons. Large page panels get nothing.
   - Movement uses the individual `translate` / `scale` properties, so it never
     overwrites a `transform` the theme already uses for positioning.
   - Only for real pointers: touch screens would leave hover "stuck" on.

   Accent colour: --hv / --hv-rgb. The dashboard overrides it in __head.blade.php
   because that theme keeps its brand colour in --td-secondary.
   ========================================================================== */

:root {
    --hv: var(--td-primary, #ff5463);
    --hv-rgb: var(--td-primary-rgb, 255, 84, 99);
    --hv-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --hv-time: 0.25s;
}

@media (hover: hover) and (pointer: fine) {

    /* ---------- 1. Header ------------------------------------------------ */

    .header-full .middle .navigation-menu ul li a {
        position: relative;
        transition: color var(--hv-time) var(--hv-ease);
    }

    .header-full .middle .navigation-menu ul li a::after {
        content: "";
        position: absolute;
        inset-inline: 0;
        width: 100%;
        bottom: -4px;
        height: 2px;
        border-radius: 2px;
        background: var(--hv);
        scale: 0 1;
        transition: scale var(--hv-time) var(--hv-ease);
    }

    .header-full .middle .navigation-menu ul li a:hover::after {
        scale: 1 1;
    }

    .header-full .left .logo img,
    .auth-logo a img {
        transition: scale var(--hv-time) var(--hv-ease);
    }

    .header-full .left .logo:hover img,
    .auth-logo a:hover img {
        scale: 1.03;
    }

    .mobile-search-button,
    .custom-language-dropdown .button-trigger,
    .notification .notification-btn,
    .chat .chat-btn,
    .header-full .action-icon {
        transition: background-color var(--hv-time) var(--hv-ease),
            box-shadow var(--hv-time) var(--hv-ease),
            translate var(--hv-time) var(--hv-ease);
    }

    .mobile-search-button:hover,
    .custom-language-dropdown .button-trigger:hover,
    .notification .notification-btn:hover,
    .chat .chat-btn:hover,
    .header-full .action-icon:hover {
        background-color: rgba(var(--hv-rgb), 0.24);
        box-shadow: 0 5px 14px -3px rgba(var(--hv-rgb), 0.35);
        translate: 0 -1px;
    }

    .user-box .user img {
        transition: box-shadow var(--hv-time) var(--hv-ease);
    }

    .user-box .user:hover img {
        box-shadow: 0 0 0 3px rgba(var(--hv-rgb), 0.28);
    }

    .user-box .user-content .content ul li a,
    .custom-language-dropdown .language-dropdown ul li a,
    .notification-panel .single-notification,
    .header-chat-panel .chat-list .chat-item {
        transition: background-color var(--hv-time) var(--hv-ease), color var(--hv-time) var(--hv-ease);
    }

    .user-box .user-content .topup-btn {
        transition: filter var(--hv-time) var(--hv-ease), opacity var(--hv-time) var(--hv-ease);
    }

    .user-box .user-content .topup-btn:hover {
        filter: brightness(0.92);
    }

    /* Search bar: the visible box is the input, so light that up */
    .search input {
        transition: border-color var(--hv-time) var(--hv-ease), box-shadow var(--hv-time) var(--hv-ease);
    }

    .search:not(.search-modal) > input:hover:not(:focus) {
        border-color: rgba(var(--hv-rgb), 0.55) !important;
        box-shadow: 0 4px 14px -4px rgba(var(--hv-rgb), 0.22) !important;
    }

    /* Mobile menu / popups opened on desktop-sized pointers */
    .offcanvas-nav ul li a {
        position: relative;
        inset-inline-start: 0;
        transition: color var(--hv-time) var(--hv-ease), inset-inline-start var(--hv-time) var(--hv-ease);
    }

    .offcanvas-nav ul li a:hover {
        inset-inline-start: 5px;
    }

    .td-offcanvas-close-toggle,
    .mobile-search-popup .close,
    .promo-popup-main .close-btn,
    .td-alert-box .close-btn {
        transition: rotate var(--hv-time) var(--hv-ease), opacity var(--hv-time) var(--hv-ease);
    }

    .td-offcanvas-close-toggle:hover,
    .mobile-search-popup .close:hover,
    .promo-popup-main .close-btn:hover,
    .td-alert-box .close-btn:hover {
        rotate: 90deg;
        opacity: 0.8;
    }

    /* ---------- 2. Buttons and text links -------------------------------- */

    .primary-button,
    .site-btn,
    .buy-now-cta {
        transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease,
            box-shadow 0.3s ease, filter 0.3s ease, transform 0.3s ease,
            translate var(--hv-time) var(--hv-ease), scale 0.15s ease;
    }

    .primary-button:not(:disabled, .disabled):hover,
    .site-btn:not(:disabled, .disabled):hover {
        translate: 0 -2px;
    }

    /* Small "press" so a click feels acknowledged */
    .primary-button:not(:disabled, .disabled):active,
    .site-btn:not(:disabled, .disabled):active,
    .buy-now-cta:active {
        translate: 0 0;
        scale: 0.98;
    }

    .view-all-btn {
        transition: color var(--hv-time) var(--hv-ease), opacity var(--hv-time) var(--hv-ease);
    }

    .td-page-contents a:not([class]),
    .page-contents article a:not([class]),
    .text-editor-content a:not([class]),
    p > span > a,
    .auth-from-box p a,
    .auth-from-box .form-check-label a {
        transition: color var(--hv-time) var(--hv-ease), opacity var(--hv-time) var(--hv-ease);
    }

    .td-page-contents a:not([class]):hover,
    .page-contents article a:not([class]):hover,
    .text-editor-content a:not([class]):hover,
    p > span > a:hover,
    .auth-from-box p a:hover,
    .auth-from-box .form-check-label a:hover {
        color: var(--hv) !important;
        opacity: 0.75;
    }

    /* Back to top (the theme positions it with transform) */
    .progress-wrap {
        transition: all 200ms linear, translate var(--hv-time) var(--hv-ease);
    }

    .progress-wrap.active-progress:hover {
        translate: 0 -4px;
        box-shadow: inset 0 0 0 2px rgba(var(--hv-rgb), 0.35), 0 8px 18px -4px rgba(var(--hv-rgb), 0.4);
    }

    /* Slider dots */
    .swiper-pagination-bullet {
        transition: scale var(--hv-time) var(--hv-ease), background-color var(--hv-time) var(--hv-ease),
            width 0.3s ease;
    }

    .swiper-pagination-clickable .swiper-pagination-bullet:hover {
        background-color: var(--hv);
        scale: 1.25;
    }

    .testimonial-slider-navs .testimonial-nav-btn,
    .popular-sellers-navs .popular-sellers-nav-btn,
    .quantity-control .qty-btn,
    .quantity-control .qty-btn svg path,
    .td-pagination ul li a,
    .common-pagination ul li a,
    .review-card .report-btn {
        transition: background-color var(--hv-time) var(--hv-ease), color var(--hv-time) var(--hv-ease),
            border-color var(--hv-time) var(--hv-ease), stroke var(--hv-time) var(--hv-ease),
            translate var(--hv-time) var(--hv-ease);
    }

    .td-pagination ul li a:hover,
    .common-pagination ul li a:hover {
        translate: 0 -2px;
    }

    /* ---------- 3. Cards on public pages --------------------------------- */

    .all-category-item {
        transition: border-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s var(--hv-ease);
    }

    .all-category-item:hover {
        translate: 0 -5px;
        box-shadow: 0 14px 28px -8px rgba(var(--hv-rgb), 0.22);
    }

    .all-category-item img {
        transition: scale 0.3s var(--hv-ease);
    }

    .all-category-item:hover img {
        scale: 1.07;
    }

    .new-listing-item {
        transition: translate 0.3s var(--hv-ease), box-shadow 0.3s ease;
    }

    .new-listing-item:hover {
        translate: 0 -4px;
        box-shadow: 0 16px 28px -10px rgba(30, 29, 37, 0.28);
    }

    .new-listing-item .list li a {
        transition: color var(--hv-time) var(--hv-ease), translate var(--hv-time) var(--hv-ease);
    }

    .new-listing-item .list li a:hover {
        translate: 4px 0;
    }

    /* Inset ring instead of a lift: the slider clips anything outside its box */
    .testimonial-item {
        transition: box-shadow 0.3s ease;
    }

    .testimonial-item:hover {
        box-shadow: inset 0 0 0 1.5px rgba(var(--hv-rgb), 0.4);
    }

    .testimonial-item .user-thumb img {
        transition: scale 0.3s var(--hv-ease);
    }

    .testimonial-item:hover .user-thumb img {
        scale: 1.08;
    }

    .single-blog-item {
        transition: border-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s var(--hv-ease);
    }

    /* The theme's drop-shadow filter also tints the text; use a box shadow */
    .single-blog-item:hover {
        translate: 0 -4px;
        filter: none;
        box-shadow: 0 14px 28px -10px rgba(var(--hv-rgb), 0.3);
    }

    .single-blog-item .blog-contents .title a {
        transition: color var(--hv-time) var(--hv-ease);
    }

    .stats-grid .stat .stat-number {
        transition: scale 0.3s var(--hv-ease);
    }

    .stats-grid .stat:hover .stat-number {
        scale: 1.07;
    }

    .ban-seller-card {
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    .ban-seller-card:hover {
        background-color: #96434f;
        border-color: rgba(255, 255, 255, 0.85);
    }

    /* FAQ */
    .faq-style-one .accordion .accordion-item {
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    .faq-style-one .accordion .accordion-item:hover {
        background-color: rgba(var(--hv-rgb), 0.16);
        border-color: rgba(var(--hv-rgb), 0.35);
    }

    .faq-style-one .accordion .accordion-button {
        transition: color var(--hv-time) var(--hv-ease);
    }

    .faq-style-one .accordion .accordion-item .accordion-button:hover,
    .faq-style-one .accordion .accordion-item.accordion-active .accordion-button:hover {
        color: var(--hv);
    }

    /* ---------- 4. Product details --------------------------------------- */

    .suggested-item {
        transition: background-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s var(--hv-ease);
    }

    .suggested-item:hover {
        background-color: rgba(var(--hv-rgb), 0.07);
        box-shadow: inset 0 0 0 1px rgba(var(--hv-rgb), 0.3);
        translate: 3px 0;
    }

    .suggested-item .suggested-img img,
    .item-details-small-image img {
        transition: scale 0.3s var(--hv-ease);
    }

    .suggested-item:hover .suggested-img img,
    .item-details-small-image:hover img {
        scale: 1.06;
    }

    .item-details-small-image {
        transition: border-color 0.3s ease;
    }

    .item-details-small-image:hover {
        border-color: rgba(var(--hv-rgb), 0.6);
    }

    .item-details-image-box,
    .seller-info-card,
    .review-card {
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .item-details-image-box:hover,
    .seller-info-card:hover,
    .review-card:hover {
        border-color: rgba(var(--hv-rgb), 0.35);
        box-shadow: 0 8px 24px -10px rgba(30, 29, 37, 0.18);
    }

    /* ---------- 5. Forms -------------------------------------------------- */

    .td-form-group .input-field input,
    .td-form-group .input-field textarea,
    .single-input .input-field .box-input,
    .input-search input,
    .custom-range-calender input,
    .referral-link-input input,
    .month-year-select select,
    .form-check-input,
    .quantity-control .quantity {
        transition: border-color var(--hv-time) ease, box-shadow var(--hv-time) ease,
            background-color var(--hv-time) ease;
    }

    .td-form-group .input-field input:hover:not(:focus, :disabled, .is-invalid),
    .td-form-group .input-field textarea:hover:not(:focus, :disabled, .is-invalid),
    .single-input .input-field .box-input:hover:not(:focus, :disabled, .is-invalid),
    .input-search input:hover:not(:focus, :disabled),
    .custom-range-calender input:hover:not(:focus, :disabled),
    .referral-link-input input:hover:not(:focus),
    .month-year-select select:hover:not(:focus, :disabled) {
        border-color: rgba(var(--hv-rgb), 0.55) !important;
    }

    .form-check-input:hover:not(:disabled) {
        border-color: var(--hv);
        box-shadow: 0 0 0 3px rgba(var(--hv-rgb), 0.15);
    }

    .quantity-control .quantity:hover:not(:focus) {
        background-color: rgba(var(--hv-rgb), 0.05);
    }

    .form-check .form-check-label[for] {
        cursor: pointer;
        transition: color var(--hv-time) ease;
    }

    .form-check .form-check-label[for]:hover {
        color: var(--hv) !important;
    }

    .select2-container .select2-selection,
    .nice-select {
        transition: border-color var(--hv-time) ease, background-color var(--hv-time) ease;
    }

    .select2-container:not(.select2-container--disabled) .select2-selection:hover,
    .nice-select:not(.disabled):hover {
        border-color: rgba(var(--hv-rgb), 0.55) !important;
    }

    /* Upload boxes */
    .upload-custom-file label {
        transition: border-color 0.3s ease, filter 0.3s ease;
    }

    .upload-custom-file label:hover {
        border-color: var(--hv);
        filter: brightness(0.94);
    }

    /* Login / register */
    .auth-nav-switcher .auth-nav-btn.active {
        transition: filter var(--hv-time) ease, box-shadow var(--hv-time) ease;
    }

    .auth-nav-switcher .auth-nav-btn.active:hover {
        filter: brightness(1.05);
    }

    /* ---------- 6. Checkout ----------------------------------------------- */

    .payment-method-box .method-item .method-button {
        transition: background-color 0.3s ease;
    }

    .payment-method-box .method-item .method-button:hover {
        background-color: rgba(var(--hv-rgb), 0.08);
    }

    .payment-method-checkbox .check-box-image {
        transition: border-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s var(--hv-ease);
    }

    .payment-method-checkbox .check-box-image:hover {
        translate: 0 -3px;
        box-shadow: 0 10px 20px -8px rgba(30, 29, 37, 0.28);
    }

    .btn-copy-payment-num,
    .btn-remove-image {
        transition: filter var(--hv-time) ease, translate var(--hv-time) var(--hv-ease);
    }

    .btn-copy-payment-num:hover,
    .btn-remove-image:hover {
        filter: brightness(0.93);
        translate: 0 -1px;
    }

    /* ---------- 7. User dashboard ----------------------------------------- */

    .seller-overview-card,
    .total-referrals .total-referrals-card,
    .referral-program .card-box,
    .referral-program .link-share-box,
    .referral-program .earn-box {
        transition: border-color 0.3s ease, box-shadow 0.3s ease, translate 0.3s var(--hv-ease);
    }

    .seller-overview-card:hover,
    .total-referrals .total-referrals-card:hover {
        translate: 0 -3px;
        box-shadow: 0 14px 30px -10px rgba(var(--hv-rgb), 0.28);
    }

    .seller-overview-card:hover {
        border-color: rgba(var(--hv-rgb), 0.4);
    }

    .seller-overview-card .icon {
        transition: scale 0.3s var(--hv-ease);
    }

    .seller-overview-card:hover .icon {
        scale: 1.08;
    }

    .referral-program .card-box:hover,
    .referral-program .link-share-box:hover,
    .referral-program .earn-box:hover {
        border-color: rgba(var(--hv-rgb), 0.35);
        box-shadow: 0 8px 22px -10px rgba(var(--hv-rgb), 0.3);
    }

    /* Secondary nav bar */
    .user-header .all-user-navbar ul li .user-header-link:hover {
        color: var(--hv);
    }

    .user-header .all-user-navbar ul li .user-header-link {
        transition: color var(--hv-time) ease, border-color var(--hv-time) ease;
    }

    .user-header .all-user-navbar ul li .sub-menu li a:hover {
        background-color: rgba(var(--hv-rgb), 0.07);
    }

    /* Page tabs, chart filters */
    .ads-step .step-btn {
        transition: color var(--hv-time) ease, background-color var(--hv-time) ease,
            border-color var(--hv-time) ease, filter var(--hv-time) ease;
    }

    .ads-step .step-btn:not(.is-active):hover {
        color: var(--hv);
        border-color: rgba(var(--hv-rgb), 0.5);
    }

    .ads-step .step-btn.is-active:hover {
        filter: brightness(0.95);
    }

    .activity-chart-btn:hover {
        color: var(--hv) !important;
    }

    /* Copy buttons: the theme's hover colour equals the resting colour */
    .referral-link-input .copy-btn {
        transition: filter var(--hv-time) ease, box-shadow var(--hv-time) ease;
    }

    .referral-link-input .copy-btn:hover {
        filter: brightness(0.92);
        box-shadow: 0 6px 14px -4px rgba(var(--hv-rgb), 0.5);
    }

    /* Table rows (not the "nothing found" row) */
    .table > tbody > tr > * {
        transition: background-color 0.2s ease;
    }

    .table > tbody > tr:not(:has(.no-data-found)):hover > * {
        background-color: rgba(var(--hv-rgb), 0.05);
    }

    .tooltip-action-btns .tooltip-btn {
        transition: background-color var(--hv-time) ease, translate var(--hv-time) var(--hv-ease);
    }

    .tooltip-action-btns .tooltip-btn:hover {
        translate: 0 -2px;
    }

    .support-chat-box .send-button,
    .support-chat-box .file-input {
        transition: filter var(--hv-time) ease, scale var(--hv-time) var(--hv-ease);
    }

    .support-chat-box .send-button:hover,
    .support-chat-box .file-input:hover {
        filter: brightness(0.93);
        scale: 1.05;
    }

    /* ---------- 8. Footer -------------------------------------------------- */

    /* The footer (logo, links, social icons, payment chips) keeps all of its
       hover effects in footer.css, linked from include/__footer.blade.php. */

    /* ---------- Right-to-left languages: slide the other way --------------- */

    [dir="rtl"] .new-listing-item .list li a:hover,
    [dir="rtl"] .suggested-item:hover {
        translate: -4px 0;
    }
}

/* Links inside page text (About, Privacy, Terms...) must look like links */
.page-contents article a:not([class]),
.text-editor-content a:not([class]) {
    color: var(--hv);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Keyboard users get an equally clear cue */
a:focus-visible,
button:focus-visible,
.accordion-button:focus-visible {
    outline: 2px solid rgba(var(--hv-rgb), 0.7);
    outline-offset: 2px;
}

/* Respect the "reduce motion" system setting: keep colours, drop movement */
@media (prefers-reduced-motion: reduce) {

    *:hover,
    *:hover *,
    *:hover::after {
        translate: none !important;
        rotate: none !important;
    }

    .offcanvas-nav ul li a:hover {
        inset-inline-start: 0;
    }
}
