@charset "UTF-8";

/* Bottom translate bar */
.livelang-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  transition: gap 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, background 0.35s ease;
  will-change: gap, box-shadow, background;
}

/* Actions hidden by default */
.livelang-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transform: translateX(12px) scale(0.9);
  transition: max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: max-width, opacity, transform;
}

/* Show actions only when bar is active */
.livelang-bar.is-active .livelang-bar-actions {
  max-width: 350px;
  opacity: 1;
  transform: translateX(0) scale(1);
  margin-left: 4px;
}

.livelang-bar.is-active {
  gap: 6px;
}

.livelang-bar-actions button {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  color: #333333;
}

.livelang-bar-actions button:hover {
  background: #f0f0f1;
  color: #333333;
}

.livelang-global-label {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6a6a6a;
  font-weight: 600;
  padding: 0 10px;
}

.elementor-editor-active .livelang-bar {
  display: none;
}

/* Main Translate button */
#livelang-toggle .livelang-bar-main {
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5a8aff, #3757d6);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  opacity: 1;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.livelang-bar.is-active .livelang-bar-main {
  background: linear-gradient(135deg, #27ae60, #007b34) !important;
}

/* Language Switcher Dropdown */
.livelang-current-language-flag,
.livelang-language-flag {
  width: 20px !important;
  height: 14px !important;
  object-fit: cover !important;
  display: inline-block !important;
  border-radius: 2px !important;
}

.livelang-language-dropdown {
  position: relative;
  display: inline-block;
}

.livelang-language-dropdown .livelang-language-toggle {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #333333;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.25s ease;
}

.livelang-language-dropdown .livelang-language-toggle:hover {
  background: #f0f0f1;
}

.livelang-language-dropdown .livelang-language-toggle .livelang-toggle-icon {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.3s ease;
}

.livelang-language-dropdown.open .livelang-language-toggle {
  background: #f0f0f1;
}

.livelang-language-dropdown.open .livelang-language-toggle .livelang-toggle-icon {
  transform: rotate(180deg);
}

.livelang-language-dropdown .livelang-language-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  z-index: 10000;
}

.livelang-language-dropdown .livelang-language-list li {
  margin: 0;
  padding: 0;
}

.livelang-language-dropdown .livelang-language-list li a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: #333333;
  font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
}

.livelang-language-dropdown .livelang-language-list li a:hover {
  background: #f5f5f6;
  color: #5a8aff;
}

.livelang-language-dropdown .livelang-language-list li a.active {
  background: #5a8aff;
  color: #ffffff;
  font-weight: 600;
}

.livelang-language-dropdown .livelang-language-list li a img {
  width: 20px !important;
  height: 14px !important;
  object-fit: cover !important;
}

.livelang-language-dropdown.open .livelang-language-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Language Switcher Dropdown */
.livelang-menu-item ul {
  display: unset !important;
}

.livelang-language-dropdown {
  position: relative;
  display: inline-block;
}

.livelang-language-dropdown .livelang-language-toggle {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #333333;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.25s ease;
}

.livelang-language-dropdown .livelang-language-toggle:hover {
  background: #f0f0f1;
}

.livelang-language-dropdown .livelang-language-toggle .livelang-toggle-icon {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.3s ease;
}

.livelang-language-dropdown.open .livelang-language-toggle {
  background: #f0f0f1;
}

.livelang-language-dropdown.open .livelang-language-toggle .livelang-toggle-icon {
  transform: rotate(180deg);
}

.livelang-language-dropdown.open .livelang-language-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-item.livelang-language-item a {
  justify-content: start;
}

/* Edit mode: disable links so user accidentally navigate না করে */
.livelang-edit-mode a {
  cursor: default !important;
}

/* Edit mode: highlight editable elements on hover */
.livelang-hovering {
  outline: 2px solid #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
  cursor: pointer !important;
  transition: outline 0.15s ease, box-shadow 0.15s ease !important;
}

.livelang-hovering:not(button) {
  background: rgba(59, 130, 246, 0.05) !important;
}

/* Active editing state */
.livelang-edit-mode [contenteditable=true],
.livelang-temp-input,
.livelang-temp-placeholder-input {
  outline: 2px solid #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25) !important;
  border-radius: 4px !important;
}

.livelang-edit-mode [contenteditable=true]:not(button),
.livelang-temp-input:not(button),
.livelang-temp-placeholder-input:not(button) {
  background: rgba(37, 99, 235, 0.06) !important;
}

/* Saved pulse animation */
.livelang-saved-flash {
  animation: livelang-pulse-saved 1s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes livelang-pulse-saved {
  0% {
    outline: 3px solid #10b981 !important;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.35) !important;
  }
  100% {
    outline: 2px solid transparent !important;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0) !important;
  }
}

/* Floating Editor Popover Card */
#livelang-editor-tooltip-container.livelang-editor-tooltip {
  position: absolute !important;
  z-index: 2147483647 !important;
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 320px !important;
  max-width: 460px !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
  animation: livelang-pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
  text-align: left !important;
  color: #0f172a !important;
  pointer-events: all !important;
  visibility: visible !important;
  opacity: 1 !important;
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1), left 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#livelang-editor-tooltip-container .livelang-popover-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
}

#livelang-editor-tooltip-container .livelang-popover-header {
  background: #f8fafc;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#livelang-editor-tooltip-container .livelang-popover-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
}

.livelang-orig-ref-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

#livelang-editor-tooltip-container .livelang-popover-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #cbd5e1;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

#livelang-editor-tooltip-container .livelang-popover-orig-text {
  font-size: 12px;
  color: #1e293b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  flex: 1;
}

.livelang-translation-input-wrap {
  width: 100%;
}

.livelang-translation-input {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 7px 10px !important;
  font-size: 13px !important;
  color: #0f172a !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.livelang-translation-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Footer Section */
#livelang-editor-tooltip-container .livelang-popover-footer {
  background: #f8fafc;
  padding: 8px 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.livelang-footer-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.livelang-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Segmented Controls */
.livelang-segmented-control {
  display: inline-flex;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.livelang-seg-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.livelang-seg-btn:hover {
  color: #0f172a;
}

.livelang-seg-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Align Controls */
.livelang-align-segmented {
  display: inline-flex;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  gap: 2px;
}

.livelang-align-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.livelang-align-btn:hover {
  color: #0f172a;
}

/* Dropdown / Select Multi-Option Translator Popover Styles */
.livelang-select-popover {
  min-width: 360px !important;
  max-width: 480px !important;
}

.livelang-select-options-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}

.livelang-select-option-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
}

.livelang-select-orig-label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  width: 130px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.livelang-select-arrow {
  font-size: 11px !important;
  color: #94a3b8 !important;
  flex-shrink: 0 !important;
}

.livelang-select-trans-input {
  flex: 1 !important;
  min-width: 140px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  color: #0f172a !important;
  font-weight: 500 !important;
  outline: none !important;
}

.livelang-select-trans-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.livelang-align-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#livelang-editor-tooltip-container .livelang-btn-nav {
  background: #ffffff !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}

#livelang-editor-tooltip-container .livelang-btn-nav:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

#livelang-editor-tooltip-container .livelang-cancel-btn {
  background: #ffffff !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#livelang-editor-tooltip-container .livelang-cancel-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

#livelang-editor-tooltip-container .livelang-save-only-btn {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1px solid #93c5fd !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

#livelang-editor-tooltip-container .livelang-save-only-btn:hover {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
}

#livelang-editor-tooltip-container .livelang-save-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
}

#livelang-editor-tooltip-container .livelang-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35) !important;
}

#livelang-editor-tooltip-container .livelang-tooltip-arrow {
  position: absolute !important;
  width: 12px !important;
  height: 12px !important;
  background: #fff !important;
  transform: rotate(45deg) !important;
  bottom: -6px !important;
  left: calc(50% - 6px) !important;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.06) !important;
  z-index: -1 !important;
}

.livelang-editor-tooltip.is-bottom .livelang-tooltip-arrow {
  top: -6px;
  bottom: auto;
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06);
}

/* Control Dock Bar */
.livelang-control-dock {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95)) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.35) !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  pointer-events: auto !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(20px) scale(0.95) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  box-sizing: border-box !important;
}

.livelang-control-dock.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
}

.livelang-dock-content {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.livelang-dock-drag-handle {
  cursor: grab;
  color: #64748b;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.2s;
}

.livelang-dock-drag-handle:hover {
  color: #cbd5e1;
}

.livelang-dock-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.livelang-dock-pulse {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}

.livelang-dock-pulse::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  background: rgba(16, 185, 129, 0.4);
  border-radius: 50%;
  animation: livelang-pulse-dock 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes livelang-pulse-dock {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.livelang-dock-flag {
  width: 18px !important;
  height: 13px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
}

.livelang-dock-lang-code {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.livelang-dock-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.livelang-dock-counter {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.livelang-dock-count-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: 999px;
}

.livelang-dock-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.livelang-dock-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

.livelang-dock-toggle-btn.is-active {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}

.livelang-dock-close {
  background: rgba(239, 68, 68, 0.2) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #f87171 !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.livelang-dock-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
}

.livelang-dock-close svg {
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor !important;
  stroke-width: 2.5px !important;
  display: block !important;
  fill: none !important;
  box-shadow: none !important;
}

/* Shortcuts Popover */
.livelang-dock-shortcuts-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  padding: 12px;
  width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.livelang-dock-shortcuts-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.livelang-shortcuts-header {
  color: #f8fafc;
  font-size: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

.livelang-shortcuts-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.livelang-shortcuts-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}

.livelang-shortcuts-list kbd {
  background: rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 10px;
}

/* Toast Host & Cards */
#livelang-toast-host {
  position: fixed;
  bottom: 85px;
  right: 24px;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.livelang-toast {
  pointer-events: auto;
  background: #0f172a;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.livelang-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.livelang-toast-success {
  border-left: 3px solid #10b981;
}

.livelang-toast-error {
  border-left: 3px solid #ef4444;
}

/* Media Translation Popover Styling */
.livelang-media-tooltip {
  min-width: 360px !important;
  max-width: 480px !important;
}

.livelang-media-popover .livelang-media-lang-badge {
  font-size: 10px;
  font-weight: 800;
  background: #3b82f6;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.livelang-media-previews {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.livelang-media-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.livelang-media-preview-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.livelang-img-frame {
  width: 90px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.livelang-img-frame img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

.livelang-media-preview-arrow {
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
}

.livelang-media-source-row {
  display: flex;
  margin-top: 4px;
}

.livelang-btn-media-library {
  width: 100%;
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px dashed #cbd5e1 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s ease !important;
}

.livelang-btn-media-library:hover {
  background: #e2e8f0 !important;
  border-color: #3b82f6 !important;
  color: #2563eb !important;
}

.livelang-media-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.livelang-media-input-group label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  margin: 0 !important;
}

.livelang-media-url-input,
.livelang-media-alt-input {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  color: #0f172a !important;
  outline: none !important;
  transition: border-color 0.15s ease !important;
}

.livelang-media-url-input:focus,
.livelang-media-alt-input:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

.livelang-media-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.livelang-media-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hide LiveLang popover and dock while WordPress Media Modal is open */
body.livelang-wp-media-open #livelang-control-dock,
body.livelang-wp-media-open #livelang-editor-tooltip-container {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Real-Time Text Alignment Rules */
.ll-align-left,
.ll-align-left-target,
span.ll-align-left-target {
  text-align: left !important;
  display: block !important;
  width: 100% !important;
}

.ll-align-center,
.ll-align-center-target,
span.ll-align-center-target {
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.ll-align-right,
.ll-align-right-target,
span.ll-align-right-target {
  text-align: right !important;
  display: block !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

*:has(> .ll-align-left-target),
*:has(> .ll-align-left) {
  text-align: left !important;
}

*:has(> .ll-align-center-target),
*:has(> .ll-align-center) {
  text-align: center !important;
}

*:has(> .ll-align-right-target),
*:has(> .ll-align-right) {
  text-align: right !important;
}

/* Code Toggle & HTML Drawer Styling */
.livelang-btn-code-toggle {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  margin-left: auto !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
}

.livelang-btn-code-toggle:hover,
.livelang-btn-code-toggle.active {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

.livelang-code-drawer {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.livelang-code-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.livelang-code-drawer-header span {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
}

.livelang-code-drawer-header small {
  font-size: 10px;
  color: #64748b;
}

.livelang-code-textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace !important;
  font-size: 12px !important;
  color: #0f172a !important;
  line-height: 1.4 !important;
  resize: vertical !important;
  outline: none !important;
  transition: border-color 0.15s ease !important;
}

.livelang-code-textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Dynamic Number Helper Styling */
.livelang-num-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 8px;
  border-radius: 6px;
}

.livelang-num-badge {
  font-size: 10px;
  font-weight: 700;
  color: #1e40af;
}

.livelang-btn-insert-num {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.livelang-btn-insert-num:hover {
  background: #1d4ed8 !important;
  transform: scale(1.02);
}