/*
 * RTL overrides for the MegaMall theme.
 * WordPress core auto-enqueues this file (after the theme's main stylesheet)
 * whenever is_rtl() is true — no manual wp_enqueue_style() call needed.
 * Mirrors the left/right-specific rules in assets/css/main.css.
 */

/* Hero slider (static + dynamic) copy block */
.mm-hero-slide-copy {
    left: auto;
    right: max(20px, calc((100vw - 1280px) / 2 + 20px));
    text-align: right;
    padding-right: 0;
    padding-left: 20px;
}

.mm-hero-static-title-wrap {
    /* symmetric left/right: 0, no change needed */
}

.mm-hero-info-box {
    left: auto;
    right: 40px;
    border-left: none;
    border-right: 4px solid #FFFFFF;
}

.mm-hero-info-item:first-child {
    border-right: none;
    border-left: 2px solid #FFFFFF33;
    padding-right: 0;
    padding-left: 20px;
}

/* Hero slider swiper nav arrows */
.mm-hero-slider .swiper-button-prev {
    left: auto;
    right: 6px;
}

.mm-hero-slider .swiper-button-next {
    right: auto;
    left: 6px;
}

@media (max-width: 768px) {
    /* Below 768px main.css re-centers .mm-hero-slide-copy (left:50%, text-align:center)
       so it no longer sits in the RTL desktop position set above — restore that here,
       otherwise the desktop right-aligned rule above wins and the Arabic headline
       collides with the swiper prev arrow. */
    .mm-hero-slide-copy {
        left: 50%;
        right: auto;
        text-align: center;
        padding-left: max(52px, env(safe-area-inset-left, 0px));
        padding-right: max(52px, env(safe-area-inset-right, 0px));
    }
}

/* Header search panel */
.mm-header-search-panel {
    right: auto;
    left: 0;
}

/* Mobile nav dropdown (symmetric left/right: 0, no change needed) */

/* Footer bottom row centering (symmetric auto margins, no change needed) */

/* Category grid cards */
.mm-category-card {
    border-right: none;
    border-left: 1px solid #ddd;
    text-align: right;
}

.mm-category-card:nth-child(5n) {
    border-left: none;
}

/* Notes list */
.mm-note {
    border-left: none;
    border-right: 4px solid #111;
}

.mm-note ul {
    padding-left: 0;
    padding-right: 18px;
}

/* Entertainment cards (row direction must flip for RTL swipe/reading order) */
@media (min-width: 769px) {
    .home-entertainment-wrapper .single-enter-item {
        flex-direction: row-reverse;
    }
}

@media (max-width: 768px) {
    /* Below 768px main.css stacks .single-enter-item as a column
       (see .home-entertainment-wrapper .single-enter-item in main.css) —
       the row-reverse above must not apply there, or the image/text
       columns overlap since the image is full width in that layout. */
    .single-enter-item .text-column {
        padding-left: 0;
        padding-right: 10px;
    }
}

/* Form field spacing */
.mm-field label span {
    margin-left: 0;
    margin-right: 4px;
}

.mm-field input[type="checkbox"] {
    margin-right: 0;
    margin-left: 8px;
}

/* Event lightbox */
.mm-event-lightbox__close {
    right: auto;
    left: 18px;
}

.mm-event-lightbox__nav--prev {
    left: auto;
    right: 18px;
}

.mm-event-lightbox__nav--next {
    right: auto;
    left: 18px;
}

@media (max-width: 768px) {
    .mm-event-lightbox__nav--prev {
        left: auto;
        right: 6px;
    }

    .mm-event-lightbox__nav--next {
        right: auto;
        left: 6px;
    }
}

@media (max-width: 480px) {
    .mm-event-lightbox__nav--prev {
        left: auto;
        right: 8px;
    }

    .mm-event-lightbox__nav--next {
        right: auto;
        left: 8px;
    }
}

.mm-event-sidebar {
    border-left: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
    .mm-event-sidebar {
        border-right: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Single offer page meta alignment */
.single-offer-page .mm-event-meta .mm-event-meta-item:last-of-type {
    text-align: left;
}

/* About page quote */
.mm-about-quote {
    padding: 28px 28px 28px 32px;
    border-left: none;
    border-right: 4px solid #c9a962;
}

/* Mega boy list + quote */
.mm-megaboy-list {
    padding-left: 0;
    padding-right: 20px;
}

.mm-megaboy-quote {
    border-left: none;
    border-right: 4px solid #caa35c;
}

/* Offer entertainment-style cards */
.offer-entertainment-card .mm-event-card__link {
    flex-direction: row-reverse;
}

/* Home section prev/next carousel arrows keep a fixed left/right position
   and direction in both languages (see .mm-home-shop-nav in main.css) —
   nothing to override here. */
