/* Site-wide RTL overrides (loaded after style.css / player.css) */

html {
	direction: rtl;
}

body {
	text-align: right;
}

/* Bootstrap 4 utility flips */
.float-left {
	float: right !important;
}
.float-right {
	float: left !important;
}
.text-left {
	text-align: right !important;
}
.text-right {
	text-align: left !important;
}
.ml-auto {
	margin-left: 0 !important;
	margin-right: auto !important;
}
.mr-auto {
	margin-right: 0 !important;
	margin-left: auto !important;
}

.main-row {
	margin-left: 0 !important;
	margin-right: -20px !important;
}

.container-fluid {
	padding-left: 15px !important;
	padding-right: 20px !important;
}

.left-navbar > ul {
	margin-right: 0;
	padding-right: 0;
}

.left-navbar > ul > li > a {
	padding-left: 0 !important;
	padding-right: 30px !important;
}

.left-navbar > ul > li > a > i {
	margin-left: 8px;
	margin-right: 0;
}

.left-navbar > ul > li.active > a {
	border-left: none;
	border-right: 2px solid #ffa501;
}

.btn-subscription i {
	margin-left: 6px;
	margin-right: 0;
}

.search-group > input {
	margin-left: 0;
	margin-right: 30px;
}

.search-group > i {
	margin-left: 0;
	margin-right: 12px;
	left: auto;
	right: 0;
}

.search-group > .btn {
	right: auto;
	left: 3px;
	border-left: none;
	border-right: 1px solid;
	border-left-color: transparent;
	border-right-color: #ffa502;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.prev_btn {
	left: auto;
	right: 0;
}

.next_btn {
	right: auto;
	left: 0;
}

.dark-mode .prev_btn {
	background: linear-gradient(to right, transparent, black);
}

.light-mode .prev_btn {
	background: linear-gradient(270deg, rgb(255, 255, 255) 20%, rgba(255, 255, 255, 0.01) 80%);
}

.dark-mode .next_btn {
	background: linear-gradient(to left, transparent, black);
}

.light-mode .next_btn {
	background: linear-gradient(270deg, rgba(255, 255, 255, 0.02) 20%, rgb(255, 255, 255) 80%);
}

.prev_btn,
.next_btn {
	width: 72px;
	font-size: 30pt;
	color: #ffa501;
}

.dark-mode .prev_btn,
.dark-mode .next_btn,
.light-mode .prev_btn,
.light-mode .next_btn {
	color: #ffa501;
}

.prev_btn i,
.next_btn i {
	transform: scaleX(-1);
}

.poster > div > div {
	left: auto;
	right: 10px;
	top: 42px;
}

.poster > div > div > p.two {
	margin-left: 0;
	margin-right: -10px;
	padding: 1px 15px 1px 7px;
}

.carousel-item .carousel-detail > div,
.banner-slide .carousel-detail > div {
	padding-left: 0;
	padding-right: 20px;
}

.carousel-item .carousel-detail button {
	left: auto;
	right: 10px;
}

.carousel-item .carousel-detail h3 span,
.banner-slide .carousel-detail h3 span {
	margin-left: 0;
	margin-right: 10px;
}

.actor-header {
	padding-left: 0;
	padding-right: 255px;
}

.actor-header-bg {
	position: relative;
}

.actor-logo {
	margin-left: 0;
	right: 40px;
	left: auto;
}

.comment-btn {
	right: auto;
	left: 20px;
}

.header-buttons {
	right: auto;
	left: 20px;
}

.header-ratings {
	right: auto;
	left: 20px;
}

.header-actions {
	position: absolute;
	left: 20px;
	right: auto;
	bottom: 12px;
	display: flex;
	flex-direction: row;
	direction: ltr;
	align-items: center;
	gap: 16px;
	z-index: 3;
}

.header-actions .header-buttons,
.header-actions .header-ratings {
	position: static;
	left: auto;
	right: auto;
	bottom: auto;
}

.header-actions .header-buttons {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.header-actions .header-ratings {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	line-height: 1.4;
	white-space: nowrap;
}

.header-ratings-summary {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ratings-panel-wrap {
	position: relative;
	flex-shrink: 0;
}

.ratings-more-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #ccc;
	background: transparent;
	color: #ccc;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
}

.ratings-more-btn i {
	transition: transform .15s ease;
}

.ratings-more-btn[aria-expanded="true"] i {
	transform: rotate(180deg);
}

.light-mode .ratings-more-btn {
	border-color: #333;
	color: #333;
}

.ratings-more-btn:hover,
.ratings-more-btn[aria-expanded="true"] {
	border-color: #ffa501;
	color: #ffa501;
}

.ratings-panel {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 0;
	width: 420px;
	max-width: calc(100vw - 32px);
	max-height: 260px;
	overflow: auto;
	z-index: 40;
	border-radius: 10px;
	padding: 14px 16px 6px;
	direction: rtl;
	text-align: right;
	white-space: normal;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
}

.dark-mode .ratings-panel {
	background: #2a2a2a;
	color: #f3f3f3;
}

.light-mode .ratings-panel {
	background: #fff;
	color: #222;
	border: 1px solid #e6e6e6;
}

.ratings-panel-filamingo-head,
.ratings-panel-filamingo-score,
.ratings-panel-source-head,
.ratings-panel-source-scores {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: nowrap;
}

.ratings-panel-filamingo-score > span,
.ratings-panel-source-scores > span,
.ratings-panel-source-name {
	white-space: nowrap;
}

.ratings-panel-filamingo {
	padding-bottom: 10px;
}

.ratings-panel-stars {
	color: #f5c518;
	letter-spacing: 1px;
}

.ratings-panel-stars .far {
	color: #8d8d8d;
}

.ratings-panel-source {
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding: 10px 0;
}

.light-mode .ratings-panel-source {
	border-top-color: #ececec;
}

.ratings-panel-source-name {
	font-weight: 700;
}

.ratings-panel-score-label {
	font-weight: 500;
	opacity: .8;
}

.ratings-panel-score-value {
	font-weight: 800;
}

.rating-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 900;
}

.rating-logo-imdb {
	background: #f5c518;
	color: #111;
	border-radius: 4px;
	padding: 1px 6px;
	letter-spacing: -.4px;
	font-size: 14px;
}

.rating-logo-rt,
.rating-logo-mc {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 12px;
}

.rating-logo-rt {
	background: #fa320a;
	color: #fff;
}

.rating-logo-mc {
	background: #f5c518;
	color: #111;
	font-size: 15px;
}

@media (max-width: 768px) {
	.header-actions .header-ratings {
		flex-direction: column;
		align-items: flex-end;
		gap: 4px;
	}

	.ratings-more-btn {
		width: 32px;
		height: 32px;
	}
}

.header-user-rating {
	position: relative;
	cursor: default;
	margin-top: 2px;
}

.header-user-rating-tooltip {
	position: absolute;
	top: calc(100% + 8px);
	bottom: auto;
	left: 50%;
	transform: translateX(-50%);
	background: #1a1a24;
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 11pt;
	font-weight: 700;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, visibility .15s ease;
	z-index: 5;
	direction: rtl;
}

.header-user-rating-tooltip::after {
	content: "";
	position: absolute;
	bottom: 100%;
	top: auto;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-bottom-color: #1a1a24;
}

.header-user-rating:hover .header-user-rating-tooltip {
	opacity: 1;
	visibility: visible;
}

.movie-header .movie-title,
.movie-header .movie-infos {
	right: 16px;
	left: 400px;
	margin-left: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.movie-header .movie-title {
	bottom: 48px;
}

.movie-header .movie-infos {
	bottom: 16px;
}

.movie-header.actor-header .movie-title,
.movie-header.actor-header .movie-infos {
	right: 255px;
	left: 16px;
}

.header-buttons > button:last-child > i {
	margin-right: 0;
	margin-left: 10px;
}

.comment-item .comment-text {
	margin-left: 0;
	margin-right: 55px;
}

.comment-item .comment-text a {
	margin-right: 0;
	margin-left: 5px;
}

.comment-item .avatar-thumb {
	float: right;
}

.play-btn {
	text-align: right;
}

.play-btn span {
	margin-right: 0;
	margin-left: 6px;
}

.play-btn,
.episode-btn {
	margin-right: 0;
	margin-left: 5px;
}

.episode-btn {
	left: auto;
	right: 10px;
}

.login-box p,
.dark-mode .login-box li {
	text-align: right;
}

.dropdown-login {
	right: auto !important;
	left: 0 !important;
}

.dropdown-login i.fas {
	margin-right: 0;
	margin-left: 10px;
}

.login-page-content {
	right: auto;
	left: 0;
}

.login-page-content #darkmode,
.login-page-content #lightmode {
	left: auto;
	right: 20px;
}

/* Keep star rating LTR so fill order stays correct, but centered */
.rate-dropdown .rate {
	float: none;
	direction: ltr;
	display: flex;
	flex-direction: row-reverse;
	justify-content: center;
	align-items: center;
	width: 100%;
	margin: 0 auto 8px;
}

.rate-dropdown .rate > label {
	float: none !important;
}

.rate-dropdown {
	display: inline-block;
	vertical-align: top;
}

.rate-dropdown .dropdown-menu {
	width: 270px !important;
	min-width: 270px !important;
	max-width: 270px !important;
	padding: 12px;
	box-sizing: border-box;
	text-align: right;
	direction: rtl;
}

.rate-dropdown .review-write,
.rate-dropdown .comment-item {
	padding: 0;
	margin: 0;
	background: transparent;
	text-align: right;
	direction: rtl;
}

.review-write .alert {
	width: 100%;
	box-sizing: border-box;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-size: 12px;
	line-height: 1.7;
	margin: 0 0 10px;
	padding: 8px 10px;
	text-align: right;
	direction: rtl;
}

.review-write .alert i {
	margin-left: 6px;
	margin-right: 0;
}

.review-write .btn-block {
	margin-top: 8px;
	clear: both;
}

.review-write .btn-default {
	background: transparent;
	border: 1px solid #666;
	color: #ccc;
}

.review-write .btn-danger {
	background-color: #c0392b;
	border-color: #c0392b;
}

.top-nav .dropdown-toggle span {
	float: right;
}

.top-nav .dropdown-toggle span.user-name,
.xs-header .dropdown-toggle span.user-name {
	float: none;
}

.xs-header .dropdown-toggle,
.top-nav .dropdown-toggle {
	padding-right: 0;
	padding-left: 10px;
}

.xs-header .dropdown-toggle img,
.top-nav .dropdown-toggle img {
	margin-right: 0;
	margin-left: 10px;
}

.alert-home {
	right: auto;
	left: 25px;
}

.alert-home > button {
	margin-left: 0;
	margin-right: 14px;
}

.alert-home > i {
	margin-left: 8px;
	margin-right: 0;
}

/* Mobile off-canvas sidebar opens from the right */
@media (max-width: 768px) {
	.sidebar {
		left: auto;
		right: -250px;
	}

	.active-sidebar {
		left: auto !important;
		right: 0 !important;
	}

	.page-header .menu-left-btn {
		left: auto;
		right: 5px;
	}

	.xs-header button {
		margin-right: 0;
		margin-left: 5px;
	}

	.header-actions {
		left: 12px;
		right: 12px;
		bottom: 10px;
		gap: 10px;
		flex-wrap: nowrap;
		max-width: calc(100% - 24px);
	}

	.header-actions .header-buttons > button,
	.header-actions .header-buttons .playlist-menu-btn {
		height: 40px;
		width: 40px;
	}

	.header-actions .header-buttons > button:last-child {
		width: 40px;
		padding: 0;
	}

	.header-actions .header-buttons > button:last-child > i {
		margin-left: 0;
		margin-right: 0;
	}

	.header-actions .header-ratings {
		font-size: 11pt;
	}

	.movie-header .movie-title,
	.movie-header .movie-infos {
		left: 12px;
		right: 12px;
	}

	.movie-header .movie-title {
		bottom: 88px;
	}

	.movie-header .movie-infos {
		bottom: 62px;
	}

	.actor-header {
		padding-left: 0 !important;
		padding-right: 160px !important;
	}

	.movie-header.actor-header .movie-title,
	.movie-header.actor-header .movie-infos {
		right: 160px;
		left: 12px;
	}

	.carousel-item .carousel-detail button {
		right: auto;
		left: -10px;
	}

	.login-page-content {
		padding-left: 20px;
		padding-right: 20px;
	}
}

/* Player */
footer > a {
	float: right;
}

.sources-dropdown .dropdown-menu label {
	margin-left: 0;
	margin-right: 5px;
}

.sources-dropdown .dropdown-menu .dropdown-item {
	padding-left: 10px;
	padding-right: 15px;
}

.next-episode {
	margin-left: 0;
	margin-right: 10px;
}

.next-episode i {
	transform: scaleX(-1);
}

/* Movie / series comments: two-column layout */
.comments-section-title {
	display: block;
	width: 100%;
	text-align: center;
	margin-bottom: 18px;
}

.comments-section-title i {
	margin-left: 8px;
}

.comments-layout {
	display: flex;
	align-items: stretch;
	gap: 24px;
}

.comments-compose,
.comments-list-panel {
	flex: 1 1 0;
	min-width: 0;
}

.comments-block .comments-compose .comment-write,
.comments-block .comment-section.comment-list {
	margin-top: 0;
	background: #0e0e1b;
	border-radius: 4px;
}

.light-mode .comments-block .comments-compose .comment-write,
.light-mode .comments-block .comment-section.comment-list {
	background: #dfdfdf;
}

.comments-block .comment-section.comment-list {
	max-height: 420px;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 4px 0;
}

.comments-block .comment-section.comment-list::-webkit-scrollbar {
	width: 6px;
}

.comments-block .comment-section.comment-list::-webkit-scrollbar-track {
	background: transparent;
}

.comments-block .comment-section.comment-list::-webkit-scrollbar-thumb {
	background: #6a6a72;
	border-radius: 8px;
}

.comments-block .comment-list .comment-item {
	margin: 0;
	padding: 16px 20px 12px;
	background: transparent;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	overflow: hidden;
}

.light-mode .comments-block .comment-list .comment-item {
	background: transparent;
	border-bottom-color: rgba(0, 0, 0, 0.08);
}

.comments-block .comment-list .comment-item:last-child {
	border-bottom: none;
}

.comments-block .comment-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.comments-block .comment-meta a {
	margin: 0;
}

.comments-block .comment-status {
	border-radius: 12px;
	color: #fff !important;
	font-size: 9pt;
	line-height: 1.4;
	padding: 2px 9px;
	margin-right: auto;
	white-space: nowrap;
}

.comments-block .comment-status-pending,
.comments-block .comment-status-new {
	background: #8a6712;
	color: #fff;
}

.comments-block .comment-status-rejected {
	background: #a83232;
	color: #fff;
}

.comments-block .comment-time,
.comments-block .comment-item .comment-text span.comment-time {
	font-size: 10pt;
	color: #616161;
	white-space: nowrap;
}

.comments-block .comment-time i {
	margin-left: 6px;
}

.comments-block .comment-replies {
	margin-top: 12px;
}

.comments-block .comment-reply {
	margin-top: 8px;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(255, 165, 1, 0.08);
	border-right: 3px solid #ffa501;
}

.light-mode .comments-block .comment-reply {
	background: rgba(255, 165, 1, 0.14);
}

.comments-block .comment-reply-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
}

.comments-block .comment-reply-author {
	color: #ffa501;
	font-weight: 700;
}

.comments-block .comment-reply-author i {
	margin-left: 6px;
}

.comments-block .comment-reply p {
	margin: 0;
}

.comments-block .comment-empty {
	padding: 40px 20px;
	text-align: center;
	color: #888;
}

.comments-block .comment-write {
	padding: 20px 20px 16px;
	overflow: hidden;
}

.comments-block .comment-write .comment-text {
	overflow: hidden;
}

.comments-block .comment-write .comment-text textarea {
	min-height: 140px;
	height: 140px;
	margin-top: 8px;
	resize: vertical;
}

.comments-block .submit-comment,
.comments-block .loading-comment {
	float: left;
	margin-top: 12px;
}

.comments-block .submit-comment i,
.comments-block .loading-comment i {
	margin-right: 6px;
	margin-left: 0;
}

.comments-block .success-comment,
.comments-block .error-comment {
	margin-top: 0;
	margin-bottom: 12px;
}

@media (max-width: 768px) {
	.comments-layout {
		flex-direction: column;
	}

	.comments-block .comment-section.comment-list {
		max-height: 360px;
	}
}

/* Playlist Dropdown RTL alignment */
.playlist-dropdown-menu,
.header-actions .playlist-dropdown-menu {
	direction: rtl !important;
	text-align: right !important;
}

.playlist-dropdown-item,
.header-actions .playlist-dropdown-item {
	text-align: right !important;
	direction: rtl !important;
}

.playlist-dropdown-item .playlist-checkbox-custom,
.header-actions .playlist-dropdown-item .playlist-checkbox-custom {
	margin-left: 10px !important;
	margin-right: 0 !important;
}

.playlist-dropdown-quick-add .input-group > .form-control,
.playlist-dropdown-quick-add .playlist-quick-input,
.playlist-quick-input,
.header-actions .playlist-dropdown-quick-add .input-group > .form-control {
	border-top-left-radius: 0 !important;
	border-bottom-left-radius: 0 !important;
	border-top-right-radius: 6px !important;
	border-bottom-right-radius: 6px !important;
	border-left: none !important;
}

.playlist-dropdown-quick-add .input-group-append > .btn,
.playlist-dropdown-quick-add .playlist-quick-submit,
.playlist-quick-submit,
.header-actions .playlist-dropdown-quick-add .input-group-append > .btn {
	border-top-right-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
	border-top-left-radius: 6px !important;
	border-bottom-left-radius: 6px !important;
}

.playlist-dropdown-quick-add .input-group-append {
	margin-left: 0 !important;
}

/* My list badges RTL alignment */
.playlist-card .poster-year {
	right: 6px;
	left: auto;
}

.playlist-card .poster-censored {
	left: 8px;
	right: auto;
}

.playlist-card .poster-eye-btn {
	left: 8px;
	right: auto;
}

.playlist-card .poster-imdb-pill {
	right: 8px;
	left: auto;
}

/* Follow Button RTL Reset */
.header-buttons > button.btn-follow,
.header-buttons > button.btn-follow:last-child,
.header-actions .header-buttons > button.btn-follow,
.header-actions .header-buttons > button.btn-follow:last-child {
	width: 50px !important;
	height: 50px !important;
	padding: 0 !important;
	margin: 0 !important;
}

.header-buttons > button.btn-follow > i,
.header-buttons > button.btn-follow:last-child > i,
.header-actions .header-buttons > button.btn-follow > i,
.header-actions .header-buttons > button.btn-follow:last-child > i {
	margin: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

@media (max-width: 768px) {
	.header-buttons > button.btn-follow,
	.header-buttons > button.btn-follow:last-child,
	.header-actions .header-buttons > button.btn-follow,
	.header-actions .header-buttons > button.btn-follow:last-child {
		width: 42px !important;
		height: 42px !important;
		padding: 0 !important;
	}
}

/* Notification Dropdown RTL */
.notif-dropdown-menu {
	position: absolute !important;
	top: 100% !important;
	left: 0 !important;
	right: auto !important;
	margin-top: 10px !important;
	transform: none !important;
}

.notif-header-title i {
	margin-left: 6px;
	margin-right: 0;
}

.btn-notif-mark-all i {
	margin-left: 4px;
	margin-right: 0;
}

@media (max-width: 768px) {
	.notif-dropdown-menu {
		position: fixed !important;
		top: 55px !important;
		left: 12px !important;
		right: 12px !important;
		width: calc(100vw - 24px) !important;
		max-width: calc(100vw - 24px) !important;
		transform: none !important;
	}
}

.header-buttons > button.btn-report,
.header-buttons > button.btn-report:last-child,
.header-actions .header-buttons > button.btn-report,
.header-actions .header-buttons > button.btn-report:last-child {
	width: 50px !important;
	height: 50px !important;
	padding: 0 !important;
	margin: 0 !important;
}

.header-buttons > button.btn-report > i,
.header-buttons > button.btn-report:last-child > i,
.header-actions .header-buttons > button.btn-report > i {
	margin: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.report-form,
.report-form-lead,
.report-problem,
.report-episode,
.report-season {
	text-align: right;
}

@media (max-width: 768px) {
	.header-buttons > button.btn-report,
	.header-buttons > button.btn-report:last-child,
	.header-actions .header-buttons > button.btn-report,
	.header-actions .header-buttons > button.btn-report:last-child {
		width: 42px !important;
		height: 42px !important;
		padding: 0 !important;
	}
}

/* Show Request RTL overrides */
.show-request-toggle {
	text-align: right !important;
}



