/* ==========================================================================
   01) Shared Language Switcher (base)
   ========================================================================== */
.ti-language-switcher {
  display: inline-flex;
  gap: var(--ti-sw-btn-gap, 12px);
  align-items: center;
  position: relative;
}

.ti-language-item {
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  border:1px solid #d0d7de;
  border-radius: 5px;
  padding: 10px;
  background: var(--ti-sw-bg, #fff);
  color: var(--ti-sw-text, #111827);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

[data-header*="Fac-j_"] [data-id="translate-switcher"] .ti-language-dropdown-menu{ border-radius: 5px !important;}

.ti-language-item:hover{
	border:1px solid #333;
}

.ti-language-item.is-current{border:1px solid #333;}

.ti-mode-fallback {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #111827;
  margin-left: 2px;
}

.ti-flag-icon {
  width: 20px;
  height: auto;
  border-radius: 2px;
  flex: 0 0 auto;
  display: block;
}

.ti-language-label {
  white-space: nowrap;
}

.ti-style-dropdown {
  display: inline-block;
  position: relative;
}

/* Shortcode variant: single-row flags only (use class="ti-flags-row") */
.ti-language-switcher.ti-flags-row.ti-style-list {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.ti-language-switcher.ti-flags-row.ti-style-list > .ti-language-item {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  transition: none;
  box-shadow: none;
  gap: 0;
}

.ti-language-switcher.ti-flags-row.ti-style-list > .ti-language-item:hover,
.ti-language-switcher.ti-flags-row.ti-style-list > .ti-language-item:focus,
.ti-language-switcher.ti-flags-row.ti-style-list > .ti-language-item.is-current {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ti-language-switcher.ti-flags-row .ti-language-label {
  display: none;
}

.ti-language-switcher.ti-flags-row .ti-flag-icon {
  width: 24px;
  border-radius: 2px;
}

.ti-language-dropdown-toggle {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.ti-language-dropdown-toggle .ti-language-label,
.ti-language-dropdown-toggle .ti-language-caret {
  display: inline-flex;
  align-items: center;
}

.ti-floating-switcher .ti-style-dropdown {
  padding-top: 8px;
  margin-top: -8px;
}

.ti-floating-switcher.ti-floating-hide-labels .ti-language-label {
  display: none;
}

.ti-floating-switcher .ti-language-switcher,
.ti-floating-switcher.ti-floating-hide-labels .ti-language-switcher{
	gap:0;
}

.ti-language-caret {
  opacity: 0.65;
  font-size: 11px;
  margin-left: var(--ti-caret-gap, 4px);
  margin-top: -2px;
  transition: transform 0.2s;
  display: inline-flex;
  align-items: center;
}

.ti-language-caret svg {
  display: block;
}

.ti-language-dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: auto;
  right: -10px !important;
  min-width: 160px;
  display: none;
  z-index: 10005;
  background: #fff;
  border: none;
  border-radius: 5px;
  padding: 6px;
  box-shadow: 0 4px 22px rgba(17, 24, 39, 0.14);
}

.ti-floating-switcher .ti-language-dropdown-menu {
  top: auto;
  left: auto;
  right: 0;
  bottom: calc(100% + 3px);
}

.ti-style-dropdown:hover .ti-language-dropdown-menu,
.ti-style-dropdown:focus-within .ti-language-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.ti-style-dropdown:hover .ti-language-caret,
.ti-style-dropdown:focus-within .ti-language-caret {
  transform: rotate(180deg);
}


/* ==========================================================================
   02) Floating Switcher (high-specificity overrides for theme resets)
   ========================================================================== */

.ti-floating-switcher {
  position: fixed;
  right: var(--ti-sw-side-offset, 20px);
  bottom: var(--ti-sw-bottom-offset, 20px);
  z-index: 10000;
  background: var(--ti-sw-container-bg, rgba(255, 255, 255, 0.95));
  border: var(--ti-sw-border, 1px solid #e5e7eb);
  border-radius: var(--ti-sw-container-radius, 50px);
  padding: var(--ti-sw-container-padding, 5px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.15);
}

.ti-floating-switcher.ti-floating-align-left {
  left: var(--ti-sw-side-offset, 20px);
  right: auto;
}

.ti-floating-switcher.ti-floating-align-center {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.ti-floating-switcher.ti-floating-align-right {
  right: var(--ti-sw-side-offset, 20px);
  left: auto;
}

.ti-floating-switcher .ti-language-item,
.ti-floating-switcher .ti-language-item:link,
.ti-floating-switcher .ti-language-item:visited {
  all: unset;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  border: var(--ti-sw-border, 1px solid #d0d7de);
  border-radius: var(--ti-sw-container-radius, 50px);
  padding: var(--ti-sw-btn-padding, 10px 12px);
  background: var(--ti-sw-bg, #fff);
  color: var(--ti-sw-text, #111827);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ti-floating-switcher .ti-language-item:hover,
.ti-floating-switcher .ti-language-item:focus {
  background: var(--ti-sw-hover-bg, #f3f4f6);
  color: var(--ti-sw-hover-text, #111827);
  border-color: var(--ti-sw-hover-bg, #f3f4f6);
  text-decoration: none;
}

.ti-floating-switcher .ti-language-item.is-current,
.ti-floating-switcher .ti-language-item.is-current:link,
.ti-floating-switcher .ti-language-item.is-current:visited {
  background: var(--ti-sw-active-bg, #111827);
  color: var(--ti-sw-active-text, #fff);
  border-color: var(--ti-sw-active-bg, #111827);
}

.ti-floating-switcher .ti-language-item.is-current:hover,
.ti-floating-switcher .ti-language-item.is-current:focus {
  background: var(--ti-sw-active-bg, #111827);
  color: var(--ti-sw-active-text, #fff);
}

.ti-floating-switcher .ti-language-dropdown-toggle {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: var(--ti-sw-border, 1px solid #d0d7de);
  border-radius: var(--ti-sw-container-radius, 50px);
  background: var(--ti-sw-bg, #fff);
  color: var(--ti-sw-text, #111827);
  font-size: 14px;
  line-height: 1;
  padding: var(--ti-sw-btn-padding, 10px 12px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ti-floating-switcher .ti-language-dropdown-toggle:hover {
  background: var(--ti-sw-hover-bg, #f3f4f6);
  color: var(--ti-sw-hover-text, #111827);
}

.ti-floating-switcher .ti-language-dropdown-toggle:focus,
.ti-floating-switcher .ti-language-dropdown-toggle:focus-visible,
.ti-floating-switcher .ti-style-dropdown:focus-within .ti-language-dropdown-toggle {
  background: var(--ti-sw-bg, #fff);
  color: var(--ti-sw-text, #111827);
  border-color: var(--ti-sw-border-color, #d0d7de);
  outline: none;
}

.ti-floating-switcher .ti-language-caret {
  margin-left: var(--ti-sw-caret-gap, 5px);
}

.ti-floating-switcher .ti-language-dropdown-menu {
  border: var(--ti-sw-border, none);
  border-radius: var(--ti-sw-dropdown-radius, 5px);
  background: var(--ti-sw-container-bg, #fff);
  box-shadow: 0 -4px 22px rgba(17, 24, 39, 0.14);
  padding: var(--ti-sw-container-padding, 5px);
}

.ti-floating-switcher .ti-style-dropdown .ti-language-item,
.ti-floating-switcher .ti-style-dropdown .ti-language-item:link,
.ti-floating-switcher .ti-style-dropdown .ti-language-item:visited {
  display: flex;
  border: 0;
  border-radius: var(--ti-sw-dropdown-item-radius, var(--ti-sw-btn-radius, 5px));
  padding: var(--ti-sw-btn-padding, 10px 12px);
  background: var(--ti-sw-bg, transparent);
  color: var(--ti-sw-text, #111827);
}

.ti-floating-switcher .ti-style-dropdown .ti-language-item:hover,
.ti-floating-switcher .ti-style-dropdown .ti-language-item:focus {
  background: var(--ti-sw-hover-bg, #f3f4f6);
  color: var(--ti-sw-hover-text, #111827);
}

.ti-floating-switcher .ti-style-dropdown .ti-language-item.is-current,
.ti-floating-switcher .ti-style-dropdown .ti-language-item.is-current:link,
.ti-floating-switcher .ti-style-dropdown .ti-language-item.is-current:visited {
  background: var(--ti-sw-active-bg, #111827);
  color: var(--ti-sw-active-text, #fff);
}

.ti-floating-switcher .ti-style-dropdown .ti-language-item.is-current:hover,
.ti-floating-switcher .ti-style-dropdown .ti-language-item.is-current:focus {
  background: var(--ti-sw-active-bg, #111827);
  color: var(--ti-sw-active-text, #fff);
}

/* ==========================================================================
   03) Blocksy Header Item controls
   ========================================================================== */
.ct-header .ti-blocksy-switcher .ti-style-dropdown {
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.ct-header .ti-blocksy-switcher .ti-language-switcher {
  gap: var(--ti-top-gap, 6px);
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-toggle,
.ct-header .ti-blocksy-switcher .ti-style-list>.ti-language-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: var(--ti-top-gap, 6px);
  color: var(--ti-top-text-color, #111827);
  background: var(--ti-top-bg, #ffffff);
  border: var(--ti-top-border, 1px solid #d0d7de);
  border-radius: var(--ti-top-radius, 999px);
  padding: var(--ti-top-padding, 6px 10px);
  font-family: var(--ti-top-font-family, var(--theme-font-family, inherit));
  font-size: var(--ti-top-font-size, var(--theme-font-size, 12px));
  line-height: var(--ti-top-line-height, var(--theme-line-height, 1.2));
  font-weight: var(--ti-top-font-weight, var(--theme-font-weight, 500));
  font-style: var(--ti-top-font-style, var(--theme-font-style, normal));
  text-transform: var(--ti-top-text-transform, var(--theme-text-transform, none));
  letter-spacing: var(--ti-top-letter-spacing, var(--theme-letter-spacing, normal));
  text-decoration: var(--ti-top-text-decoration, var(--theme-text-decoration, none));
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-toggle:hover,
.ct-header .ti-blocksy-switcher .ti-style-list>.ti-language-item:hover {
  color: var(--ti-top-text-color-hover, var(--ti-top-text-color, #111827)) !important;
}

.ct-header .ti-blocksy-switcher .ti-language-caret {
  margin-left: var(--ti-top-caret-gap, 4px);
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-toggle .ti-flag-icon {
  align-self: center;
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-menu {
  background: var(--ti-dropdown-bg, #ffffff);
  border: var(--ti-dropdown-border, none);
  border-radius: var(--ti-dropdown-radius, 4px);
  padding: var(--ti-dropdown-menu-padding, 6px);
  gap: var(--ti-dropdown-item-gap, 0px);
  box-shadow: 0 4px 22px rgba(17, 24, 39, 0.14);
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-menu .ti-language-item {
  color: var(--ti-dropdown-text-color, #111827);
  padding: var(--ti-dropdown-item-padding, 8px 10px);
  border: var(--ti-dropdown-item-border, 0 none);
  border-radius: 6px;
  background: var(--ti-dropdown-item-bg, transparent);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: var(--ti-dropdown-font-family, var(--theme-font-family, inherit));
  font-size: var(--ti-dropdown-font-size, var(--theme-font-size, 12px));
  line-height: var(--ti-dropdown-line-height, var(--theme-line-height, 1.2));
  font-weight: var(--ti-dropdown-font-weight, var(--theme-font-weight, 500));
  font-style: var(--ti-dropdown-font-style, var(--theme-font-style, normal));
  text-transform: var(--ti-dropdown-text-transform, var(--theme-text-transform, none));
  letter-spacing: var(--ti-dropdown-letter-spacing, var(--theme-letter-spacing, normal));
  text-decoration: var(--ti-dropdown-text-decoration, var(--theme-text-decoration, none));
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-menu .ti-language-item:hover {
  background: var(--ti-dropdown-item-bg-hover, rgba(0, 0, 0, 0.04));
  color: var(--ti-dropdown-text-color-hover, var(--ti-dropdown-text-color, #111827)) !important;
}

.ct-header .ti-blocksy-switcher .ti-language-dropdown-toggle,
.ct-header .ti-blocksy-switcher .ti-style-list>.ti-language-item,
.ct-header .ti-blocksy-switcher .ti-language-dropdown-menu .ti-language-item {
  box-shadow: none !important;
}

/* ==========================================================================
   04) Translation Editor panel shell
   ========================================================================== */
.ti-editor-selected {
  outline: 2px dashed #f59e0b;
  outline-offset: 2px;
  cursor: pointer;
}

.ti-editor-selection-rect {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  border: 2px dashed #f59e0b;
  border-radius: 2px;
  box-sizing: border-box;
}

.ti-editor-preview-rect {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border: 1px dashed rgba(245, 158, 11, 0.85);
  border-radius: 2px;
  background: rgba(245, 158, 11, 0.06);
  box-sizing: border-box;
}

.ti-editor-preview-rect.is-active {
  border-width: 2px;
  background: rgba(245, 158, 11, 0.12);
}

.ti-editor-panel {
  position: fixed;
  top: 32px;
  left: 0;
  bottom: 0;
  z-index: 10001;
  width: var(--ti-editor-panel-width, 280px);
  max-width: 100%;
  display: none;
  background: #eceeef;
  border-right: 1px solid #d6d8dc;
  font-family: Roboto, Arial, Helvetica, sans-serif;
}

.ti-editor-panel.is-open {
  display: block;
}

.ti-editor-card {
  background: #fff !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.ti-editor-topbar {
  height: 48px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d6d8dc;
  background: #fff;
}

.ti-editor-brand-wrap {
  flex: 1;
  padding: 0 10px;
  display: flex;
  align-items: center;
}

.ti-editor-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 15px !important;
  min-width: auto !important;
  justify-content: flex-end;
}


.ti-editor-exit {
  border: 0 !important;
  background: #333 !important;
  color: #fff !important;
  width: 48px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
  line-height: 1 !important;
  font-weight: 200 !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  padding: 0 0 5px 0 !important;
  border-right: 1px solid #333 !important;
}


.ti-editor-exit:focus {
  outline: none !important;
  box-shadow: none !important;
  border-right-color: #333 !important;
}
.ti-editor-exit{ border: none !important;}
.ti-editor-exit:hover {
  border-right-color: #333 !important;
}

.tip-page-target-language{ font-size: 13px !important; text-transform: capitalize !important;}

.ti-deepl-btn,
.button-primary.ti-save-top,
.button-primary.ti-save-top.tip-auto-translate-page{ 
	padding: 5px 10px !important; text-transform: uppercase !important;
	border: none !important; font-size: 13px !important;   border-radius: 3px !important;
}

/* Keep WordPress media-library close button untouched by editor styles. */
body .media-modal .media-modal-close {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #646970 !important;
  box-shadow: none !important;
}


body .media-modal .media-modal-close:hover,
body .media-modal .media-modal-close:focus {
  background: #f0f0f1 !important;
  color: #1d2327 !important;
}

body .media-modal .media-modal-close .media-modal-icon:before {
  font-size: 20px !important;
  line-height: 32px !important;
}

.ti-save-top {
  border-radius: 3px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 4px 15px !important;
  min-height: auto !important;
  background-color: #ff8400 !important;
  color:#fff !important;
}


.ti-editor-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 15px !important;
  display: block;
}

.ti-field {
  display: block;
  margin: 0 0 12px;
}

.ti-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ti-language-fields {
  max-height: none;
  overflow: visible;
  padding: 0 !important;
}


.ti-string-selector {
  border: 1px solid #d6d8dc;
  border-radius: 6px;
  background: #fff;
  padding: 12px !important;
  margin: 0 0 12px;
  box-shadow: none;
}

/* Search row: input + prev/next arrows side by side */
.ti-picker-search-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ti-prev-string,
.ti-next-string {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #d6d8dc !important;
  background: #fff !important;
  color: #556068 !important;
  padding: 0 !important;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  min-height: auto !important;
  min-width: auto !important;
  box-shadow: none !important;
}

.ti-prev-string:hover,
.ti-next-string:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: #eff6ff !important;
}

/* ========= Hover Color ============== */
.ti-media-pick:hover,
.ti-editor-exit:hover, .ti-save-top:hover{
	background-color: #e67600 !important;
}



/* prev/next hover handled above in .ti-picker-search-wrap block */



/* ==========================================================================
   05) Split/Combine source mode controls
   ========================================================================== */

/* Hidden by default; JS removes ti-source-mode-hidden to reveal it. */
.ti-source-mode.ti-source-mode-hidden {
  display: none;
}

/* Visible state: the ti-source-mode-hidden class has been removed by JS. */
.ti-source-mode:not(.ti-source-mode-hidden) {
  display: block;
  margin-bottom: 10px;
}

.ti-source-mode label {
  font-size: 12px;
  color: #344054;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Combine action label — styled as a soft action hint so it's obvious it's clickable */
.ti-source-mode .ti-combine-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}

.ti-source-mode .ti-combine-action:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Hover block-level combined preview — single unified outline */
.ti-editor-preview-rect.ti-preview-block {
  border: 2px dashed rgba(245, 158, 11, 0.9);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 3px;
}

.ti-source-mode-fab {
  position: fixed;
  z-index: 10003;
  display: inline-flex;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 3px;
}

.ti-source-mode-fab.is-hidden {
  display: none;
}

.ti-mode-btn {
  all: unset;
  box-sizing: border-box;
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #333 !important;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ti-mode-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.ti-mode-btn img {
  display: block;
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  pointer-events: none;
}

.ti-mode-btn .ti-inline-fallback {
  display: none;
}

.ti-mode-btn.is-fallback img {
  display: none;
}

.ti-mode-btn.is-fallback .ti-inline-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ti-mode-btn .ti-inline-fallback svg {
  width: 32px;
  height: 32px;
  display: block;
  color: currentColor;
  fill: currentColor;
}

/* ==========================================================================
   06a) SEO Meta Panel
   ========================================================================== */
.ti-seo-panel {
  border: 1px solid #d6d8dc;
  border-radius: 6px;
  background: #fff;
  margin: 0 0 12px;
  overflow: hidden;
}

.ti-seo-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  background: #475467 !important;
  border: none !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  text-align: left;
  box-shadow: none !important;
  min-height: auto !important;
  border-radius: 0 !important;
}

.ti-seo-toggle:hover {
  background: #344054 !important;
  color: #fff !important;
}

.ti-seo-toggle-icon {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.ti-seo-toggle[aria-expanded="true"] .ti-seo-toggle-icon {
  transform: rotate(180deg);
}

.ti-seo-body {
  border-top: 1px solid #f3f4f6;
  padding: 12px;
}

.ti-seo-field-group {
  margin-bottom: 14px;
}

.ti-seo-field-group:last-child {
  margin-bottom: 0;
}

.ti-seo-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.ti-seo-source-text {
  font-size: 12px;
  color: #556068;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.ti-seo-lang-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 3px;
  margin-top: 4px;
}

.ti-seo-translation-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d6d8dc;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #344054;
  resize: vertical;
  background: #fff;
  min-height: 52px;
  margin-bottom: 4px;
  font-family: inherit;
}

.ti-seo-translation-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
  outline: none;
}

.ti-seo-actions {
  margin-top: 10px;
}

.ti-seo-save {
  width: 100%;
  font-size: 14px !important;
  padding: 6px 14px !important;
  height: auto !important;
  min-height: auto !important;
  box-sizing: border-box;
}

.ti-seo-empty {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

/* ==========================================================================
   06) Editor form fields & string picker
   ========================================================================== */

.ti-string-search {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid #d6d8dc;
  border-radius: 5px;
  padding: 0 10px;
  box-sizing: border-box;
  font-size: 13px !important;
  color: #344054;
  background: #fff;
}

.ti-string-search:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
  outline: none;
  background: #fff;
}

/* ── Picker dropdown list ── */
.ti-picker-dropdown {
  display: none;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d6d8dc;
  border-radius: 5px;
  background: #fff;
  margin-top: 2px;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.ti-picker-dropdown::-webkit-scrollbar {
  width: 5px;
}
.ti-picker-dropdown::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.ti-picker-dropdown.is-open {
  display: block;
}

/* Individual string row */
.ti-picker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: #344054;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
  line-height: 1.35;
}

.ti-picker-item:last-child {
  border-bottom: none;
}

.ti-picker-item:hover {
  background: #f0f4ff;
  color: #1d4ed8;
}

.ti-picker-item.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 500;
}

/* Already-translated items: subtly muted */
.ti-picker-item.is-done {
  color: #6b7280;
}

.ti-picker-item.is-done:hover,
.ti-picker-item.is-done.is-active {
  color: #1d4ed8;
}

.ti-picker-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Checkmark for translated strings */
.ti-picker-item-tick {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Search highlight */
.ti-picker-match {
  background: #fef9c3;
  color: #854d0e;
  border-radius: 2px;
  padding: 0 1px;
  font-style: normal;
}

/* Empty state */
.ti-picker-empty {
  padding: 12px 10px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

.ti-language-field {
  margin-bottom: 10px;
  border: 1px solid #d6d8dc;
  border-radius: 3px;
  padding: 12px !important;
  background: #fff;
}

.ti-field-label {
  display: block;
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 7px;
  color: #535961 !important;
  font-weight: 400;
}

.ti-copy-source {
  all: unset !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  height: 22px !important;
  text-align: center !important;
  border-radius: 5px !important;
  padding: 5px 10px !important;
  border: 1px solid #d6d8dc !important;
  background: #fff !important;
  color: #535961 !important;
  cursor: pointer !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s !important;
  color:#333 !important !important;
  justify-content: flex-start !important;
  margin-top: -5px !important;
  margin-right: 0 !important;
}

.ti-copy-source:hover {
  color: #ab0f0f !important;
}

.ti-copy-source.is-copied {
  background: #e8f5e9 !important;
  color: #166534 !important;
  border-color: #86efac !important;
}

.ti-deepl-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-size: 13px !important;
  color: #0073aa !important;
  background: #f0f6fc !important;
  cursor: pointer;
  line-height: 1 !important;
}

.ti-deepl-btn:hover {
  background: #dbeafe !important;
  color: #005177 !important;
}

.ti-deepl-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* PHP / Gettext string badge shown next to the Original label */
.ti-gettext-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: default;
  vertical-align: middle;
}

.ti-editor-card textarea {
  width: 100%;
  min-height: 86px;
  font-size: 13px;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  border-radius: 3px;
  border: 1px solid #d6d8dc;
  padding: 8px 10px;
  line-height: 1.4;
}

.ti-media-row {
  display: flex;
  gap: 8px;
  align-items: center;
  align-items: flex-end !important;
  justify-content: space-between !important;
}

.ti-media-preview {
  width: 90px;
  height: 90px;
  border-radius: 3px !important;
  object-fit: cover;
  background: #fff !important;
  border: 1px solid #d0d7de;
  display: block;
}

.ti-media-preview.is-empty {
  background-color: #eeeeee !important;
  border: none !important; 
}

.ti-editor-card .ti-media-input {
  display: none;
}

.ti-media-row .ti-media-pick {
  white-space: nowrap;
  height: auto !important;
}

.ti-media-pick{ 
	font-size: 13px !important; 
	padding: 3px 10px !important;
	text-transform: capitalize !important;
	min-height: auto !important;
	min-width: auto !important;
	border-radius: 3px !important;
	background-color: #333 !important; 
	color:#fff !important;
}



.ti-editor-card textarea:focus {
  border-color: #a4afb7;
  box-shadow: none;
  outline: none;
}

.ti-source {
  background: #f6f7f7;
  color: #1d2327;
}

.ti-target {
  background: #fff;
}

.ti-target-default {
  background: #f8fafc;
  color: #1d2327;
}

.ti-status {
  font-size: 11px;
  color: #6d7882;
  min-height: 20px;
  line-height: 20px;
}

.ti-top-status {
  max-width: 120px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   07) Canvas offset while editor panel is open
   ========================================================================== */
body.ti-editor-mode {
  --ti-editor-panel-width: 300px;
  margin-left: 0;
}

/* Universal canvas offset: JS marks body's direct content children with
   .ti-editor-canvas (see initEditor in frontend.js). Works for single-wrapper
   themes (Astra #page, Blocksy #main-container) and multi-sibling themes
   (Hello Elementor: header + main + footer) alike — no theme IDs needed. */
body.ti-editor-mode > .ti-editor-canvas {
  margin-left: var(--ti-editor-panel-width) !important;
  width: calc(100% - var(--ti-editor-panel-width)) !important;
  box-sizing: border-box !important;
}

/* Blocksy: avoid header/container crop in editor mode.
   Blocksy's fluid container uses viewport-based width math; in TranslateCanvas
   we shrink #main-container, so force fluid container width to parent canvas. */
body.ti-editor-mode .ct-container-fluid {
  width: calc(100% - (var(--theme-frame-size, 0px) * 2)) !important;
  max-width: calc(100% - (var(--theme-frame-size, 0px) * 2)) !important;
}

body.ti-editor-mode header#header .ct-container-fluid {
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* ==========================================================================
   08) Responsive fallback (mobile/tablet)
   ========================================================================== */
@media (max-width: 782px) {
  body.ti-editor-mode {
    --ti-editor-panel-width: 0px;
    margin-left: 0;
  }

  body.ti-editor-mode > .ti-editor-canvas {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .ti-editor-panel {
    left: 0;
    right: 0;
    width: 100%;
    top: 46px;
    bottom: 0;
  }
}



/* ==========================================================================
   09) Shortcode
   ========================================================================== */
   .ct-header-text .entry-content .ti-language-switcher.ti-style-dropdown .ti-language-dropdown-toggle{
	   background-color: #fff; padding: 10px;
	   border-radius: 50px; border:1px solid #d2d7dd; color: #333;
   }
   
   .ti-language-switcher.ti-style-dropdown .ti-language-dropdown-menu a{
	   border: none; padding: 10px;
   }
 
   .ti-language-switcher.ti-style-dropdown .ti-language-dropdown-menu a:hover{
	   background-color: #f5f5f5;
   }
   
   
   .ti-language-switcher.ti-style-list{ margin: 0;}

/* ==========================================================================
   RTL (Right-to-Left) Language Support
   Applied when body has the .ti-rtl class (set by PHP when active lang is RTL)
   ========================================================================== */

/* 1. Page content direction
   body.ti-rtl sets the base direction for all page text so Arabic / Hebrew /
   Farsi etc. flow naturally without any theme changes. */
body.ti-rtl,
body.rtl {
  direction: rtl;
  unicode-bidi: embed;
}

/* 2. Editor panel — mirror from left side to right side */
body.ti-rtl .ti-editor-panel {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid #d6d8dc;
}

/* Flip the topbar exit button to the right corner */
body.ti-rtl .ti-editor-topbar {
  flex-direction: row-reverse;
}
body.ti-rtl .ti-editor-topbar-actions {
  padding-right: 0 !important;
  padding-left: 15px !important;
}

/* 3. Textareas — handled per-field by JS (dir="rtl" attribute).
   These rules add a visual cue so the user sees RTL fields immediately. */
.ti-target[dir="rtl"] {
  text-align: right;
  direction: rtl;
  unicode-bidi: plaintext;
  font-family: inherit;
}

/* 4. Source-mode toggle widget — flip when RTL */
body.ti-rtl .ti-source-mode-fab {
  left: var(--ti-editor-panel-width, 280px);
  right: auto;
}

/* 5. Language switcher — no structural change needed; items naturally
   reflect the base page direction once body.ti-rtl is set. */

/* 6. Floating switcher — mirror to left when page is RTL so it doesn't
   overlap the editor panel (which is now on the right). */
body.ti-rtl .ti-floating-switcher {
  right: auto;
  left: 20px;
}
   
   
   
   
   
   

/* ------------------------------------------------------------------
   Editor sidebar upsell (shown only while Pro is inactive)
   ------------------------------------------------------------------ */
.ti-upsell {
  margin: 20px 0 0;
}

.ti-upsell-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.ti-upsell-card {
  border: 1px solid #d6d8dc;
  border-radius: 6px;
  background: #f6f7f8;
  padding: 16px;
}

.ti-upsell-list {
  margin: 0 0 14px;
  padding: 0 0 0 18px;
  list-style: disc;
}

.ti-upsell-list li {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #1f2937;
}

.ti-upsell-cta {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 4px;
  background: #d63638;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.ti-upsell-cta:hover,
.ti-upsell-cta:focus {
  background: #b32d2e;
  color: #fff !important;
}
