/* Mixed Arabic/English writing direction support across School Management screens. */
.wlsm-bidi-rtl {
	direction: rtl !important;
	text-align: right !important;
	unicode-bidi: plaintext;
}

.wlsm-bidi-ltr {
	direction: ltr !important;
	text-align: left !important;
	unicode-bidi: plaintext;
}

input[dir="auto"],
textarea[dir="auto"],
[contenteditable][dir="auto"],
.form-control[dir="auto"] {
	unicode-bidi: plaintext;
}

input[dir="rtl"],
textarea[dir="rtl"],
[contenteditable][dir="rtl"],
.form-control[dir="rtl"] {
	direction: rtl !important;
	text-align: right !important;
	unicode-bidi: plaintext;
}

input[dir="ltr"],
textarea[dir="ltr"],
[contenteditable][dir="ltr"],
.form-control[dir="ltr"] {
	direction: ltr !important;
	text-align: left !important;
	unicode-bidi: plaintext;
}

/* Account-scoped language direction: keep School Management UI independent from the WordPress/site locale. */
body.wlsm-locale-en .wlsm,
body.wlsm-locale-en .wlsm-container,
body.wlsm-locale-en .wlsm-admin,
body.wlsm-locale-en .wlsm-shortcode-shell,
body.wlsm-locale-en .wlsm-content-area,
body.wlsm-locale-en .wlsm-main-header,
body.wlsm-locale-en .dataTables_wrapper {
	direction: ltr;
	text-align: left;
}

body.wlsm-locale-ar .wlsm,
body.wlsm-locale-ar .wlsm-container,
body.wlsm-locale-ar .wlsm-admin,
body.wlsm-locale-ar .wlsm-shortcode-shell,
body.wlsm-locale-ar .wlsm-content-area,
body.wlsm-locale-ar .wlsm-main-header,
body.wlsm-locale-ar .dataTables_wrapper {
	direction: rtl;
	text-align: right;
}

body.wlsm-locale-en .wlsm table,
body.wlsm-locale-en .wlsm-container table,
body.wlsm-locale-en .wlsm-admin table,
body.wlsm-locale-en .wlsm-shortcode-shell table {
	direction: ltr;
}

body.wlsm-locale-ar .wlsm table,
body.wlsm-locale-ar .wlsm-container table,
body.wlsm-locale-ar .wlsm-admin table,
body.wlsm-locale-ar .wlsm-shortcode-shell table {
	direction: rtl;
}

body.wlsm-locale-en .wlsm th,
body.wlsm-locale-en .wlsm td,
body.wlsm-locale-en .wlsm-container th,
body.wlsm-locale-en .wlsm-container td,
body.wlsm-locale-en .wlsm-admin th,
body.wlsm-locale-en .wlsm-admin td,
body.wlsm-locale-en .wlsm-shortcode-shell th,
body.wlsm-locale-en .wlsm-shortcode-shell td {
	text-align: left;
}

body.wlsm-locale-ar .wlsm th,
body.wlsm-locale-ar .wlsm td,
body.wlsm-locale-ar .wlsm-container th,
body.wlsm-locale-ar .wlsm-container td,
body.wlsm-locale-ar .wlsm-admin th,
body.wlsm-locale-ar .wlsm-admin td,
body.wlsm-locale-ar .wlsm-shortcode-shell th,
body.wlsm-locale-ar .wlsm-shortcode-shell td {
	text-align: right;
}

body.wlsm-locale-en .wlsm input,
body.wlsm-locale-en .wlsm textarea,
body.wlsm-locale-en .wlsm select,
body.wlsm-locale-en .wlsm-container input,
body.wlsm-locale-en .wlsm-container textarea,
body.wlsm-locale-en .wlsm-container select,
body.wlsm-locale-en .wlsm-admin input,
body.wlsm-locale-en .wlsm-admin textarea,
body.wlsm-locale-en .wlsm-admin select,
body.wlsm-locale-en .wlsm-shortcode-shell input,
body.wlsm-locale-en .wlsm-shortcode-shell textarea,
body.wlsm-locale-en .wlsm-shortcode-shell select {
	direction: ltr;
	text-align: left;
}

body.wlsm-locale-ar .wlsm input,
body.wlsm-locale-ar .wlsm textarea,
body.wlsm-locale-ar .wlsm select,
body.wlsm-locale-ar .wlsm-container input,
body.wlsm-locale-ar .wlsm-container textarea,
body.wlsm-locale-ar .wlsm-container select,
body.wlsm-locale-ar .wlsm-admin input,
body.wlsm-locale-ar .wlsm-admin textarea,
body.wlsm-locale-ar .wlsm-admin select,
body.wlsm-locale-ar .wlsm-shortcode-shell input,
body.wlsm-locale-ar .wlsm-shortcode-shell textarea,
body.wlsm-locale-ar .wlsm-shortcode-shell select {
	direction: rtl;
	text-align: right;
}

body.wlsm-locale-ar .wlsm input[type="email"],
body.wlsm-locale-ar .wlsm input[type="url"],
body.wlsm-locale-ar .wlsm input[type="number"],
body.wlsm-locale-ar .wlsm input[type="tel"],
body.wlsm-locale-ar .wlsm input[type="password"],
body.wlsm-locale-ar .wlsm-container input[type="email"],
body.wlsm-locale-ar .wlsm-container input[type="url"],
body.wlsm-locale-ar .wlsm-container input[type="number"],
body.wlsm-locale-ar .wlsm-container input[type="tel"],
body.wlsm-locale-ar .wlsm-container input[type="password"],
body.wlsm-locale-ar .wlsm-admin input[type="email"],
body.wlsm-locale-ar .wlsm-admin input[type="url"],
body.wlsm-locale-ar .wlsm-admin input[type="number"],
body.wlsm-locale-ar .wlsm-admin input[type="tel"],
body.wlsm-locale-ar .wlsm-admin input[type="password"],
body.wlsm-locale-ar .wlsm-shortcode-shell input[type="email"],
body.wlsm-locale-ar .wlsm-shortcode-shell input[type="url"],
body.wlsm-locale-ar .wlsm-shortcode-shell input[type="number"],
body.wlsm-locale-ar .wlsm-shortcode-shell input[type="tel"],
body.wlsm-locale-ar .wlsm-shortcode-shell input[type="password"] {
	direction: ltr;
	text-align: left;
}

.wlsm-language-switcher-notice {
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.wlsm-language-switcher-helper,
.wlsm-language-switcher-current {
	display: block;
	margin-top: 4px;
}

.wlsm-language-switcher-frontend {
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid #dbeafe;
	border-radius: 14px;
	background: #eff6ff;
	color: #1e3a8a;
}

.wlsm-language-switcher-frontend[dir="ltr"] {
	direction: ltr;
	text-align: left;
}

.wlsm-language-switcher-frontend[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

@media (max-width: 640px) {
	.wlsm-language-switcher-notice {
		align-items: flex-start;
		flex-direction: column;
	}
}

/* Compact account-scoped language button. */
.wlsm-language-switcher-admin-compact{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  padding:10px 12px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.wlsm-language-switcher-admin-compact[dir="rtl"]{
  justify-content:flex-start!important;
}
.wlsm-language-switcher-admin-compact .wlsm-language-switcher-pill,
.wp-admin .wlsm-language-switcher-pill{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:38px!important;
  padding:0 15px!important;
  border:1px solid rgba(37,99,235,.18)!important;
  border-radius:999px!important;
  color:#fff!important;
  background:linear-gradient(135deg,#1d4ed8,#06b6d4)!important;
  box-shadow:0 12px 28px rgba(37,99,235,.24)!important;
  font-size:13px!important;
  font-weight:900!important;
  text-decoration:none!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.wlsm-language-switcher-admin-compact .wlsm-language-switcher-pill:hover,
.wp-admin .wlsm-language-switcher-pill:hover{
  transform:translateY(-1px)!important;
  color:#fff!important;
  box-shadow:0 16px 34px rgba(37,99,235,.30)!important;
}
.wlsm-language-switcher-pill .wlsm-language-switcher-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
#wpadminbar #wp-admin-bar-wlsm-ui-language > .ab-item{
  height:28px!important;
  line-height:28px!important;
  margin-top:2px!important;
  padding:0 11px!important;
  border-radius:999px!important;
  color:#fff!important;
  background:linear-gradient(135deg,#1d4ed8,#06b6d4)!important;
  box-shadow:0 8px 20px rgba(37,99,235,.22)!important;
}
#wpadminbar #wp-admin-bar-wlsm-ui-language > .ab-item .ab-icon:before{
  content:"\f326";
  top:2px;
  color:#fff!important;
}
#wpadminbar #wp-admin-bar-wlsm-ui-language > .ab-item .ab-label{
  color:#fff!important;
  font-weight:700!important;
}
