/* ============================================================
   Smart Translator Pro — Frontend Styles
   ============================================================ */

:root {
  --st-primary:      #6366f1;
  --st-primary-h:    #4f46e5;
  --st-surface:      #ffffff;
  --st-border:       rgba(99, 102, 241, 0.18);
  --st-text:         #1e1b4b;
  --st-text-muted:   #6b7280;
  --st-radius:       12px;
  --st-radius-pill:  100px;
  --st-shadow:       0 4px 24px rgba(99, 102, 241, 0.15);
  --st-shadow-hover: 0 8px 32px rgba(99, 102, 241, 0.25);
  --st-transition:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --st-blur:         blur(12px);
}

/* ---- Hard reset — prevents Elementor/theme from adding bullets or margins ---- */
.st-switcher ul,
.st-switcher ul.st-pills {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.st-switcher li,
.st-switcher .st-pills__item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ---- Switcher wrapper ---- */
.st-switcher {
  display: inline-block;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.st-align-center { display: flex; justify-content: center; }
.st-align-right  { display: flex; justify-content: flex-end; }

/* ================================================================
   PILLS style
   ================================================================ */
.st-pills {
  display: flex !important;
  align-items: center;
  gap: 6px;
  list-style: none !important;
  margin: 0 !important;
  padding: 6px !important;
  background: rgba(255,255,255,0.72);
  backdrop-filter: var(--st-blur);
  -webkit-backdrop-filter: var(--st-blur);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-pill);
  box-shadow: var(--st-shadow);
}

.st-pills__item {
  display: flex;
  align-items: center;
  border-radius: var(--st-radius-pill);
  cursor: pointer;
  transition: all var(--st-transition);
  user-select: none;
  position: relative;
  outline: none;
}

.st-pills__item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--st-radius-pill);
  background: var(--st-primary);
  opacity: 0;
  transition: opacity var(--st-transition);
}

.st-pills__item:hover {
  color: var(--st-primary);
}

.st-pills__item:hover::before {
  opacity: 0.08;
}

.st-pills__item--active {
  /* background handled by st-pill__inner--active */
}

.st-pills__item--active::before { display: none; }

.st-pills__item:focus-visible {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

.st-pill__flag {
  font-size: 16px;
  line-height: 1;
}

.st-pill__name {
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* Ripple on click */
.st-pills__item .st-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: st-ripple 0.5s linear;
  background: rgba(255,255,255,0.4);
  pointer-events: none;
}

@keyframes st-ripple {
  to { transform: scale(4); opacity: 0; }
}

/* ================================================================
   DROPDOWN style
   ================================================================ */
.st-dropdown {
  position: relative;
  z-index: 100;
}

.st-dropdown__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: var(--st-blur);
  -webkit-backdrop-filter: var(--st-blur);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  box-shadow: var(--st-shadow);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--st-text);
  transition: all var(--st-transition);
  outline: none;
  min-width: 160px;
}

.st-dropdown__toggle:hover {
  border-color: var(--st-primary);
  box-shadow: var(--st-shadow-hover);
}

.st-dropdown__toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

.st-dropdown__arrow {
  margin-left: auto;
  transition: transform var(--st-transition);
  flex-shrink: 0;
}

.st-dropdown--open .st-dropdown__arrow {
  transform: rotate(180deg);
}

.st-dropdown__current {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.st-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: var(--st-blur);
  -webkit-backdrop-filter: var(--st-blur);
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(99,102,241,0.1);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity var(--st-transition), transform var(--st-transition);
  z-index: 9999;
}

.st-dropdown--open .st-dropdown__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.st-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--st-text);
  transition: all 0.15s;
  white-space: nowrap;
}

.st-dropdown__item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--st-primary);
}

.st-dropdown__item--active {
  background: linear-gradient(135deg, var(--st-primary), var(--st-primary-h));
  color: #fff;
}

.st-dropdown__item--active:hover {
  background: linear-gradient(135deg, var(--st-primary), var(--st-primary-h));
  color: #fff;
}

/* ================================================================
   Progress bar
   ================================================================ */
.st-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.st-progress--active {
  opacity: 1;
}

.st-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--st-primary), #a5b4fc, var(--st-primary));
  background-size: 200% 100%;
  width: 0;
  transition: width 0.3s ease;
  animation: st-progress-shimmer 1.5s infinite;
}

@keyframes st-progress-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ================================================================
   Page transition overlay
   ================================================================ */
.st-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0);
  pointer-events: none;
  z-index: 99998;
  transition: background 0.3s;
}
.st-overlay--active {
  background: rgba(255,255,255,0.5);
  pointer-events: all;
}

/* ================================================================
   Toast notification
   ================================================================ */
.st-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: #1e1b4b;
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-toast--show {
  opacity: 1;
  transform: translateY(0);
}
.st-toast__icon { font-size: 16px; }

/* ================================================================
   Translating state
   ================================================================ */
[data-st-translating="true"] {
  opacity: 0.7;
  transition: opacity 0.2s;
}

/* Responsive */
@media (max-width: 480px) {
  .st-pills { flex-wrap: wrap; }
  .st-pill__name { display: none; }
  .st-pills__item { padding: 8px 10px; }
}

.st-pill__form {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.st-pill__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: var(--st-radius-pill);
    background: transparent;
    color: var(--st-text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--st-transition);
}

.st-pill__btn:hover {
    color: var(--st-primary);
    background: rgba(99, 102, 241, 0.08);
}

.st-pill__inner--active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--st-radius-pill);
    background: linear-gradient(135deg, var(--st-primary), var(--st-primary-h));
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    transform: scale(1.02);
}
