/* Moyasar Modal Styles */
.moyasar-modal {
	display: none;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9999;
}

.moyasar-modal .modal-header {
	padding: 0px;
}

.moyasar-modal .modal-header .close-moyasar-form {
	font-size: 20px;
	cursor: pointer;
	padding: 5px;
	align-items: center;
	width: 29px;
	height: 29px;
	display: flex;
	justify-content: center;
}

/* ============================================================
   COMPREHENSIVE RTL FIX FOR ODOO 17
   Counteracts problematic rules from web.assets_frontend.rtl.css
   ============================================================ */

/* Global RTL direction */
#wrapwrap.o_rtl {
	direction: rtl;
}

/* --- HEADER & NAVBAR --- */
#wrapwrap.o_rtl #top_menu {
	padding-right: 0 !important;
	padding-left: 0 !important;
}

#wrapwrap.o_rtl .navbar-nav .nav-link {
	padding-right: 1rem !important;
	padding-left: 1rem !important;
}

#wrapwrap.o_rtl .navbar-brand {
	margin-left: 1rem !important;
	margin-right: 0 !important;
}

/* --- SIDEBAR CATEGORIES --- */
#wrapwrap.o_rtl .wsale_products_categories_list>ul {
	padding-right: 0 !important;
}

#wrapwrap.o_rtl #products_grid_before {
	padding-right: 0 !important;
}

#wrapwrap.o_rtl #products_grid_before .nav,
#wrapwrap.o_rtl #products_grid_before ul {
	padding-right: 0 !important;
	padding-left: 0 !important;
}

/* Form-check (checkboxes/radios in category & attribute filters) */
#wrapwrap.o_rtl .form-check {
	padding-right: 1.5em !important;
	padding-left: 0 !important;
}

#wrapwrap.o_rtl .form-check .form-check-input {
	float: right !important;
	margin-right: -1.5em !important;
	margin-left: 0 !important;
}

/* --- SEARCH BAR --- */
#wrapwrap.o_rtl .o_wsale_products_searchbar_form .input-group {
	display: flex !important;
	flex-direction: row-reverse !important;
	flex-wrap: nowrap !important;
}

#wrapwrap.o_rtl .o_wsale_products_searchbar_form .input-group>.form-control {
	flex: 1 1 auto !important;
	width: auto !important;
	border-radius: 0 0.375rem 0.375rem 0 !important;
}

#wrapwrap.o_rtl .o_wsale_products_searchbar_form .input-group>.btn {
	border-radius: 0.375rem 0 0 0.375rem !important;
}

/* --- PRODUCT GRID BUTTONS --- */
#wrapwrap.o_rtl #products_grid:not(.o_wsale_layout_list) td.oe_product .o_wsale_product_btn {
	right: 0 !important;
	left: auto !important;
}

#wrapwrap.o_rtl #products_grid:not(.o_wsale_layout_list) .oe_product_image_link {
	left: auto !important;
}

/* --- FILMSTRIP CATEGORIES --- */
#wrapwrap.o_rtl .o_wsale_filmstip_wrapper li {
	margin: 0 0.5rem !important;
}

#wrapwrap.o_rtl ul.o_wsale_filmstip {
	padding-right: 0 !important;
}

/* --- SORT/VIEW BUTTONS --- */
#wrapwrap.o_rtl .o_wsale_products_searchbar_form .dropdown,
#wrapwrap.o_rtl .o_wsale_products_searchbar_form .btn-group {
	margin: 0 0.25rem !important;
}

/* --- CAROUSEL CONTROLS --- */
#wrapwrap.o_rtl .carousel-control-prev {
	left: auto !important;
	right: 0 !important;
}

#wrapwrap.o_rtl .carousel-control-next {
	right: auto !important;
	left: 0 !important;
}

/* --- GENERIC INPUT-GROUP BORDER-RADIUS FIX --- */
#wrapwrap.o_rtl .input-group> :not(:first-child) {
	border-top-right-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}

#wrapwrap.o_rtl .input-group> :not(:last-child) {
	border-top-left-radius: 0 !important;
	border-bottom-left-radius: 0 !important;
}

#wrapwrap.o_rtl .input-group> :first-child {
	border-top-right-radius: 0.375rem !important;
	border-bottom-right-radius: 0.375rem !important;
}

#wrapwrap.o_rtl .input-group> :last-child {
	border-top-left-radius: 0.375rem !important;
	border-bottom-left-radius: 0.375rem !important;
}

/* --- NEWSLETTER/SUBSCRIBE INPUT GROUP --- */
#wrapwrap.o_rtl .s_newsletter_subscribe_form .input-group>input {
	border-radius: 0 25px 25px 0 !important;
}

#wrapwrap.o_rtl .s_newsletter_subscribe_form .input-group>.btn {
	border-radius: 25px 0 0 25px !important;
}

#wrapwrap.o_rtl footer .input-group>input {
	border-radius: 0 25px 25px 0 !important;
}

#wrapwrap.o_rtl footer .input-group>.btn {
	border-radius: 25px 0 0 25px !important;
}

/* --- BREADCRUMB --- */
#wrapwrap.o_rtl .breadcrumb-item+.breadcrumb-item::before {
	float: right !important;
	padding-left: 0.5rem !important;
	padding-right: 0 !important;
}

/* --- DROPDOWN MENUS --- */
#wrapwrap.o_rtl .dropdown-menu {
	text-align: right !important;
}

/* --- PRODUCT PRICE & DESCRIPTION TEXT --- */
#wrapwrap.o_rtl .oe_product .product_price {
	text-align: right !important;
}

/* --- PAGINATION --- */
#wrapwrap.o_rtl .pagination .page-item:first-child .page-link {
	border-radius: 0 0.375rem 0.375rem 0 !important;
}

#wrapwrap.o_rtl .pagination .page-item:last-child .page-link {
	border-radius: 0.375rem 0 0 0.375rem !important;
}

/* --- LIST GROUP (Sidebar attributes etc) --- */
#wrapwrap.o_rtl .list-group-item {
	text-align: right !important;
}

/* --- MOYASAR MODAL RTL --- */
#wrapwrap.o_rtl .moyasar-modal .modal-header {
	justify-content: flex-start;
}

#wrapwrap.o_rtl .moyasar-modal .modal-header .close-moyasar-form {
	margin-left: auto;
	margin-right: 0;
}