/* ===== Language & Region drawer (Wise-style) ===== */
.lang-drawer-overlay {
  --drawer-accent: #6C3BFF;
  --drawer-accent-end: #8A5CFF;
  --drawer-accent-hover: #5b2de0;
  --drawer-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.lang-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lang-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lang-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px 0 0 20px;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  font-family: var(--drawer-font);
}

.lang-drawer-overlay.is-open .lang-drawer {
  transform: translateX(0);
}

@media (max-width: 480px) {
  .lang-drawer {
    max-width: 100%;
    border-radius: 0;
  }
}

/* Header */
.lang-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
  flex-shrink: 0;
}

.lang-drawer-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.lang-drawer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-drawer-close:hover {
  background: rgba(108, 59, 255, 0.12);
  color: var(--drawer-accent);
}

.lang-drawer-close:focus-visible {
  outline: 2px solid var(--drawer-accent);
  outline-offset: 2px;
}

.lang-drawer-close svg {
  width: 20px;
  height: 20px;
}

/* Body */
.lang-drawer-body {
  padding: 1.5rem 1.5rem 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Language section */
.lang-drawer-section {
  margin-bottom: 1.5rem;
}

.lang-drawer-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.lang-drawer-select-wrap {
  position: relative;
}

.lang-drawer-select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--drawer-font);
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-drawer-select:hover,
.lang-drawer-select:focus {
  border-color: var(--drawer-accent);
  box-shadow: 0 0 0 3px rgba(108, 59, 255, 0.15);
  outline: none;
}

.lang-drawer-select-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #64748b;
  pointer-events: none;
}

/* Region search */
.lang-drawer-search-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.lang-drawer-search-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.lang-drawer-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.9375rem;
  font-family: var(--drawer-font);
  color: #0f172a;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-drawer-search::placeholder {
  color: #94a3b8;
}

.lang-drawer-search:hover,
.lang-drawer-search:focus {
  border-color: var(--drawer-accent);
  box-shadow: 0 0 0 3px rgba(108, 59, 255, 0.15);
  outline: none;
}

/* Country list */
.lang-drawer-country-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
}

.lang-drawer-country-list::-webkit-scrollbar {
  width: 6px;
}

.lang-drawer-country-list::-webkit-scrollbar-track {
  background: transparent;
}

.lang-drawer-country-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.2);
  border-radius: 3px;
}

.lang-drawer-country-list::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.3);
}

.lang-drawer-country-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--drawer-font);
  background: transparent;
}

.lang-drawer-country-item:hover {
  background: rgba(108, 59, 255, 0.08);
}

.lang-drawer-country-item.is-selected {
  background: rgba(108, 59, 255, 0.12);
  color: var(--drawer-accent);
  font-weight: 500;
}

.lang-drawer-country-flag {
  font-size: 1.25rem;
  line-height: 1;
}

/* Footer / Button */
.lang-drawer-footer {
  padding: 1rem 1.5rem 1.5rem;
  flex-shrink: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.lang-drawer-confirm {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--drawer-font);
  color: #fff;
  background: linear-gradient(135deg, var(--drawer-accent) 0%, var(--drawer-accent-end) 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 14px rgba(108, 59, 255, 0.35);
}

.lang-drawer-confirm:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108, 59, 255, 0.4);
}

.lang-drawer-confirm:focus-visible {
  outline: 2px solid var(--drawer-accent);
  outline-offset: 2px;
}
