/* 
 * Surgical RTL Fixes for Gamiplex 
 * Targets only the .rtl-active class on the body
 * NOTE: Sidebar and UI Structure remain on the LEFT as requested.
 */

body.rtl-active {
    font-family: 'Tajawal', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    text-align: right;
    direction: rtl;
}

/* Keep Sidebar on the Left even in RTL */
body.rtl-active .main-sidebar, 
body.rtl-active .left-side {
    left: 0;
    right: auto;
}

body.rtl-active .content-wrapper, 
body.rtl-active .right-side, 
body.rtl-active .main-footer {
    margin-left: 230px;
    margin-right: 0;
}

@media (max-width: 767px) {
    body.rtl-active .content-wrapper, 
    body.rtl-active .right-side, 
    body.rtl-active .main-footer {
        margin-left: 0;
    }
}

/* Mirroring utility for Icons only */
body.rtl-active .fa-chevron-right:before {
    content: "\f053"; /* fa-chevron-left */
}
body.rtl-active .fa-chevron-left:before {
    content: "\f054"; /* fa-chevron-right */
}

/* Prevent Banner Carousel from flipping (as requested) */
body.rtl-active .carousel, 
body.rtl-active .carousel-control {
    direction: ltr !important;
}

body.rtl-active .carousel-control .fa-chevron-right:before {
    content: "\f054" !important; /* Force stay right */
}

body.rtl-active .carousel-control .fa-chevron-left:before {
    content: "\f053" !important; /* Force stay left */
}

body.rtl-active .fa-arrow-right:before {
    content: "\f060"; /* fa-arrow-left */
}
body.rtl-active .fa-arrow-left:before {
    content: "\f061"; /* fa-arrow-right */
}

/* Search widget icon mirror */
body.rtl-active .searchbox a {
    right: auto;
    left: 30px;
}

/* Category Slider Mirror */
body.rtl-active ul#menu {
    direction: rtl;
}

/* Rating mirror */
body.rtl-active .ratingSize .rating {
    float: right;
}
body.rtl-active .ratingSize .size {
    float: left;
}

/* Section-title utility styles */
.section-title {
    border-left: 4px solid #f04646;
    padding-left: 10px;
}

body.rtl-active .section-title {
    border-left: none !important;
    border-right: 4px solid #f04646;
    padding-left: 0 !important;
    padding-right: 10px;
}

/* Header Adjustments - Force English layout for Header */
body.rtl-active .main-header {
    direction: ltr !important;
    text-align: left !important;
}

body.rtl-active .header-actions-dock {
    justify-content: flex-end; /* Standard LTR behavior */
}

/* Info Box Mirroring (Game Detail Page) */
body.rtl-active .info-box-icon {
    float: right;
}
body.rtl-active .info-box-content {
    margin-left: 0;
    margin-right: 90px;
    padding: 0 10px;
}

/* Section Heading Mirroring (More Button) */
body.rtl-active .gameheading {
    float: right;
}
body.rtl-active .morebuttondiv {
    float: left;
}

/* Subscription Table RTL Adjustments */
body.rtl-active .table td {
    text-align: right !important; /* Labels on right */
}
body.rtl-active .table td[style*="text-align: right"] {
    text-align: left !important; /* Values on left */
}

/* Modal text alignment */
body.rtl-active .modal-body {
    text-align: right;
}

/* Pull-right adjustments */
body.rtl-active .pull-right {
    float: left !important;
}
body.rtl-active .pull-left {
    float: right !important;
}
