/* Simplicio & SimpleTI — Floating Flag Language Picker */
.sf-lang-picker {
  position: relative;
  display: inline-block;
  user-select: none;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  z-index: 1000;
}

.sf-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  min-height: 40px;
  background: #ffffff;
  border: 2px solid #8b5cf6;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #172638;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.12);
  outline: none;
}

.sf-lang-btn:hover,
.sf-lang-btn[aria-expanded="true"] {
  border-color: #7c3aed;
  background: #faf5ff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.22);
  transform: translateY(-1px);
}

.sf-lang-btn .sf-flag {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}

.sf-lang-btn .sf-arrow {
  width: 12px;
  height: 12px;
  stroke: #7c3aed;
  stroke-width: 2.2;
  fill: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-lang-btn[aria-expanded="true"] .sf-arrow {
  transform: rotate(180deg);
}

.sf-lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 175px;
  max-height: 380px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 2000;
  overscroll-behavior: contain;
}

.sf-lang-dropdown.is-open {
  display: flex;
  animation: sfLangMenuIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sfLangMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sf-lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.sf-lang-item:hover {
  background: #f1f5f9;
  color: #7c3aed;
  transform: translateX(2px);
}

.sf-lang-item.is-active {
  background: #f5f3ff;
  color: #7c3aed;
  font-weight: 800;
}

.sf-lang-item .sf-flag {
  font-size: 20px;
  line-height: 1;
}

.sf-lang-item .sf-code {
  font-size: 14px;
  letter-spacing: 0.03em;
}

.sf-lang-item .sf-name {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-left: auto;
}

.sf-lang-item.is-active .sf-name {
  color: #8b5cf6;
}

/* Custom scrollbar for flag dropdown */
.sf-lang-dropdown::-webkit-scrollbar {
  width: 5px;
}
.sf-lang-dropdown::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
.sf-lang-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
