/* MKSE controlled multilingual layer
   English / Arabic (Oman) / Bangla
   Loaded after all legacy themes so custom modules follow the selected direction. */

html.mkse-dir-rtl,
html.mkse-dir-rtl body {
    direction: rtl;
}

html.mkse-lang-arabic body,
html.mkse-lang-arabic input,
html.mkse-lang-arabic select,
html.mkse-lang-arabic textarea,
html.mkse-lang-arabic button,
html.mkse-lang-arabic-oman body,
html.mkse-lang-arabic-oman input,
html.mkse-lang-arabic-oman select,
html.mkse-lang-arabic-oman textarea,
html.mkse-lang-arabic-oman button {
    font-family: Tahoma, Arial, "Noto Sans Arabic", sans-serif;
}

html.mkse-lang-bangla body,
html.mkse-lang-bangla input,
html.mkse-lang-bangla select,
html.mkse-lang-bangla textarea,
html.mkse-lang-bangla button {
    font-family: "Noto Sans Bengali", Vrinda, SolaimanLipi, Arial, sans-serif;
}

/* Keep codes, references, dates, email addresses and numeric values readable. */
html.mkse-dir-rtl input[type="number"],
html.mkse-dir-rtl input[type="date"],
html.mkse-dir-rtl input[type="month"],
html.mkse-dir-rtl input[type="time"],
html.mkse-dir-rtl input[type="email"],
html.mkse-dir-rtl input[type="url"],
html.mkse-dir-rtl .mkse-number,
html.mkse-dir-rtl .mkse-code,
html.mkse-dir-rtl code,
html.mkse-dir-rtl pre,
html.mkse-dir-rtl [data-mkse-ltr] {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed;
}

html.mkse-dir-rtl .mkse-content-wrapper,
html.mkse-dir-rtl .content-wrapper,
html.mkse-dir-rtl .panel,
html.mkse-dir-rtl .modal-content,
html.mkse-dir-rtl .dropdown-menu,
html.mkse-dir-rtl .table,
html.mkse-dir-rtl .form-horizontal,
html.mkse-dir-rtl .mkse-language-control {
    text-align: right;
}

html.mkse-dir-rtl .dropdown-menu > li > a,
html.mkse-dir-rtl .sidebar .nav > li > a,
html.mkse-dir-rtl .sidebar .nav > li > .nav-item,
html.mkse-dir-rtl label,
html.mkse-dir-rtl th {
    text-align: right;
}

html.mkse-dir-rtl .input-group-addon:first-child,
html.mkse-dir-rtl .input-group-btn:first-child > .btn,
html.mkse-dir-rtl .input-group-btn:first-child > .btn-group > .btn,
html.mkse-dir-rtl .input-group-btn:first-child > .dropdown-toggle,
html.mkse-dir-rtl .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
    border-radius: 0 4px 4px 0;
}

html.mkse-dir-rtl .input-group-addon:last-child,
html.mkse-dir-rtl .input-group-btn:last-child > .btn,
html.mkse-dir-rtl .input-group-btn:last-child > .btn-group > .btn,
html.mkse-dir-rtl .input-group-btn:last-child > .dropdown-toggle,
html.mkse-dir-rtl .input-group-btn:first-child > .btn:not(:first-child) {
    border-radius: 4px 0 0 4px;
}

html.mkse-dir-rtl .mkse-page-heading-copy,
html.mkse-dir-rtl .mkse-page-actions,
html.mkse-dir-rtl .mkse-language-card-head,
html.mkse-dir-rtl .mkse-language-savebar,
html.mkse-dir-rtl .mkse-language-hero,
html.mkse-dir-rtl .mkse-language-controls {
    direction: rtl;
}

html.mkse-dir-rtl .mkse-page-heading-icon,
html.mkse-dir-rtl .fa,
html.mkse-dir-rtl .glyphicon,
html.mkse-dir-rtl .icon-notebook,
html.mkse-dir-rtl [class^="icon-"] {
    direction: ltr;
}

html.mkse-dir-rtl .dataTables_filter,
html.mkse-dir-rtl .dataTables_length,
html.mkse-dir-rtl .dataTables_info,
html.mkse-dir-rtl .dataTables_paginate {
    text-align: right;
}

html.mkse-dir-rtl .pagination > li > a,
html.mkse-dir-rtl .pagination > li > span {
    float: right;
}

/* Native language selector */
.mkse-language-selector > a,
.mkse-language-menu .mkse-top-action {
    display: flex !important;
    align-items: center;
    gap: 7px;
}

.mkse-language-selector .dropdown-menu {
    min-width: 220px;
    padding: 7px;
}

.mkse-language-selector .dropdown-menu > li > a,
.mkse-language-menu .dropdown-menu > li > a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    border-radius: 6px;
}

.mkse-language-selector .dropdown-menu img,
.mkse-language-menu .dropdown-menu img {
    width: 22px;
    max-height: 16px;
    object-fit: cover;
    flex: 0 0 22px;
}

.mkse-language-option-copy {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mkse-language-option-copy small {
    opacity: .66;
    font-size: 10px;
}

.mkse-language-current-mark {
    color: #28a745;
    margin-inline-start: auto;
}

/* Language Control Center */
.mkse-language-control {
    --mkse-lang-navy: #17213f;
    --mkse-lang-blue: #3577aa;
    --mkse-lang-green: #2b9a70;
    --mkse-lang-gold: #c88b27;
    color: #24324a;
}

.mkse-language-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    margin-bottom: 14px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(120deg, #17213f, #2f6282);
    box-shadow: 0 12px 30px rgba(23, 33, 63, .16);
}

.mkse-language-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .82;
}

.mkse-language-hero h2 {
    margin: 0 0 7px;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}

.mkse-language-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,.8);
}

.mkse-language-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.mkse-language-hero-actions .btn-default {
    color: #17213f;
    background: #fff;
    border-color: rgba(255,255,255,.7);
}

.mkse-language-current-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mkse-language-current-strip > div {
    padding: 13px 15px;
    border: 1px solid #dce5ef;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(24, 46, 73, .05);
}

.mkse-language-current-strip span {
    display: block;
    margin-bottom: 4px;
    color: #7a8799;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mkse-language-current-strip strong {
    color: #17213f;
    font-size: 15px;
}

.mkse-language-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.mkse-language-card {
    position: relative;
    padding: 18px;
    border: 1px solid #dce5ef;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(24, 46, 73, .06);
    overflow: hidden;
}

.mkse-language-card:before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: #a8b7c8;
}

.mkse-language-card.is-current:before {
    background: linear-gradient(90deg, var(--mkse-lang-green), var(--mkse-lang-blue));
}

.mkse-language-card.is-current {
    border-color: rgba(43, 154, 112, .45);
}

.mkse-language-card-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}

.mkse-language-flag {
    display: grid;
    place-items: center;
    width: 45px;
    height: 34px;
    border: 1px solid #dce5ef;
    border-radius: 7px;
    background: #f8fafc;
}

.mkse-language-flag img {
    max-width: 28px;
    max-height: 20px;
}

.mkse-language-card-title {
    min-width: 0;
    flex: 1;
}

.mkse-language-card-title h3 {
    margin: 0 0 2px;
    color: #17213f;
    font-size: 18px;
    font-weight: 700;
}

.mkse-language-card-title p {
    margin: 0;
    color: #7a8799;
    font-size: 11px;
}

.mkse-language-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.mkse-language-card-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    color: #536174;
    background: #f1f5f9;
    font-size: 10px;
}

.mkse-language-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    color: #536174;
    font-size: 11px;
}

.mkse-language-progress {
    height: 7px;
    margin-bottom: 6px;
    border-radius: 999px;
    background: #eef2f7;
}

.mkse-language-progress .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--mkse-lang-blue), var(--mkse-lang-green));
}

.mkse-language-card > small {
    display: block;
    min-height: 17px;
    color: #8994a4;
}

.mkse-language-controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0 12px;
    padding: 11px;
    border-radius: 8px;
    background: #f8fafc;
}

.mkse-language-controls label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #445269;
    font-size: 11px;
    cursor: pointer;
}

.mkse-language-notes {
    margin-top: 14px;
    padding: 18px 20px 8px;
    border: 1px solid #dce5ef;
    border-radius: 11px;
    background: #fff;
}

.mkse-language-notes h4 {
    margin: 0 0 14px;
    color: #17213f;
    font-weight: 700;
}

.mkse-language-notes b {
    color: #263650;
}

.mkse-language-notes p {
    margin-top: 5px;
    color: #718096;
    font-size: 12px;
    line-height: 1.6;
}

.mkse-language-savebar {
    position: sticky;
    z-index: 20;
    bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dce5ef;
    border-radius: 9px;
    color: #536174;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(24,46,73,.12);
    backdrop-filter: blur(8px);
}

@media (max-width: 1100px) {
    .mkse-language-grid { grid-template-columns: 1fr; }
    .mkse-language-current-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .mkse-language-hero { align-items: flex-start; flex-direction: column; padding: 20px; }
    .mkse-language-hero-actions { justify-content: flex-start; }
    .mkse-language-current-strip { grid-template-columns: 1fr; }
    .mkse-language-savebar { align-items: stretch; flex-direction: column; }
    .mkse-language-savebar .btn { width: 100%; }
    .mkse-language-controls { flex-direction: column; }
}


/* Public Knowledge/Catalogue selector does not depend on Bootstrap JS. */
.kp-language-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.kp-language-selector > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.kp-language-selector .dropdown-menu {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    display: none;
    min-width: 230px;
    margin: 0;
    padding: 7px;
    list-style: none;
    border: 1px solid rgba(23, 33, 63, .12);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(23, 33, 63, .16);
}

.kp-language-selector.open .dropdown-menu {
    display: block;
}

.kp-language-selector .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    color: #24324a;
    text-decoration: none;
    border-radius: 7px;
}

.kp-language-selector .dropdown-menu a:hover {
    background: #f1f5f9;
}

html.mkse-dir-rtl .kp-language-selector .dropdown-menu {
    right: auto;
    left: 0;
}
