.touch-target {
  min-height: 60px;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-picker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-picker.show {
  pointer-events: auto;
  opacity: 1;
}

.premium-picker__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease-out;
}

.premium-picker__modal {
  position: relative;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.premium-picker.show .premium-picker__modal {
  transform: scale(1);
  opacity: 1;
}

html.dark .premium-picker__modal {
  background: #1c1c1e;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.premium-picker__swipe-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 5px;
  background: rgba(120, 120, 128, 0.3);
  border-radius: 100px;
  display: none;
  touch-action: none;
  z-index: 2;
}

.premium-picker__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.premium-picker__header:active {
  cursor: grabbing;
}

html.dark .premium-picker__header {
  border-bottom-color: rgba(84, 84, 88, 0.35);
}

.premium-picker__title {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

html.dark .premium-picker__title {
  color: #ffffff;
}

.premium-picker__subtitle {
  font-size: 13px;
  color: #8e8e93;
  margin: 2px 0 0;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

html.dark .premium-picker__subtitle {
  color: #98989d;
}

.premium-picker__close {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(120, 120, 128, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  color: #8e8e93;
  margin-top: 2px;
}

.premium-picker__close:hover {
  background: rgba(120, 120, 128, 0.2);
}

.premium-picker__close:active {
  transform: scale(0.9);
}

html.dark .premium-picker__close {
  background: rgba(120, 120, 128, 0.24);
  color: #98989d;
}

.premium-picker__search-wrapper {
  position: relative;
  padding: 12px 16px;
  flex-shrink: 0;
}

.premium-picker__search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #8e8e93;
  pointer-events: none;
}

html.dark .premium-picker__search-icon {
  color: #636366;
}

.premium-picker__search {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  font-size: 17px;
  border: none;
  border-radius: 10px;
  background: rgba(120, 120, 128, 0.12);
  color: #000000;
  transition: all 0.2s ease;
  outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

.premium-picker__search::placeholder {
  color: #8e8e93;
}

.premium-picker__search:focus {
  background: rgba(120, 120, 128, 0.18);
}

html.dark .premium-picker__search {
  background: rgba(120, 120, 128, 0.24);
  color: #ffffff;
}

html.dark .premium-picker__search::placeholder {
  color: #636366;
}

.premium-picker__letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  flex-shrink: 0;
}

html.dark .premium-picker__letters {
  border-bottom-color: rgba(84, 84, 88, 0.35);
}

.premium-picker__letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(120, 120, 128, 0.08);
  color: #007AFF;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

.premium-picker__letter:hover,
.premium-picker__letter.active {
  background: #007AFF;
  color: #ffffff;
}

.premium-picker__section {
  padding: 12px 16px 8px;
  flex-shrink: 0;
}

.premium-picker__section-label {
  font-size: 13px;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

.premium-picker__recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.premium-picker__recent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 12px;
  border: none;
  background: rgba(120, 120, 128, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
}

.premium-picker__recent-card:hover {
  background: rgba(120, 120, 128, 0.12);
}

.premium-picker__recent-card:active {
  transform: scale(0.96);
}

.premium-picker__recent-flag {
  width: 36px;
  height: 36px;
}

.premium-picker__recent-name {
  font-size: 12px;
  font-weight: 500;
  color: #000000;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

html.dark .premium-picker__recent-name {
  color: #ffffff;
}

.premium-picker__list-container {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  will-change: scroll-position;
}

.premium-picker__list {
  padding: 4px 0;
}

.premium-picker__list::-webkit-scrollbar {
  width: 0;
  display: none;
}

.premium-picker__region-header {
  font-size: 13px;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 16px 20px 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

html.dark .premium-picker__region-header {
  color: #98989d;
}

.premium-picker__country {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  border-radius: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease;
  width: 100%;
  text-align: left;
  min-height: 52px;
  position: relative;
}

.premium-picker__country::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 70px;
  right: 20px;
  height: 0.5px;
  background: rgba(60, 60, 67, 0.12);
}

.premium-picker__country:last-child::after {
  display: none;
}

html.dark .premium-picker__country::after {
  background: rgba(84, 84, 88, 0.35);
}

.premium-picker__country:hover,
.premium-picker__country.focused {
  background: rgba(120, 120, 128, 0.08);
}

.premium-picker__country:active {
  background: rgba(120, 120, 128, 0.12);
}

.premium-picker__country.selected {
  background: rgba(0, 122, 255, 0.06);
}

html.dark .premium-picker__country:hover,
html.dark .premium-picker__country.focused {
  background: rgba(120, 120, 128, 0.16);
}

html.dark .premium-picker__country.selected {
  background: rgba(10, 132, 255, 0.12);
}

.premium-picker__flag-circle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

.premium-picker__country-flag {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.premium-picker__country-info {
  flex: 1;
  min-width: 0;
}

.premium-picker__country-name {
  font-size: 17px;
  font-weight: 400;
  color: #000000;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

.premium-picker__country.selected .premium-picker__country-name {
  font-weight: 500;
}

html.dark .premium-picker__country-name {
  color: #ffffff;
}

.premium-picker__country-iso {
  font-size: 13px;
  color: #8e8e93;
  font-weight: 400;
  margin-top: 1px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

html.dark .premium-picker__country-iso {
  color: #98989d;
}

.premium-picker__country-currency {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(120, 120, 128, 0.08);
  color: #8e8e93;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

.premium-picker__country.selected .premium-picker__country-currency {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
}

html.dark .premium-picker__country-currency {
  background: rgba(120, 120, 128, 0.2);
  color: #98989d;
}

html.dark .premium-picker__country.selected .premium-picker__country-currency {
  background: rgba(10, 132, 255, 0.2);
  color: #0a84ff;
}

.premium-picker__country-check {
  color: #007AFF;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

html.dark .premium-picker__country-check {
  color: #0a84ff;
}

.premium-picker__no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: #8e8e93;
  text-align: center;
}

.premium-picker__no-results svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

.premium-picker__no-results p {
  font-size: 15px;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

html.dark .premium-picker__no-results {
  color: #636366;
}

.flag-circle {
  border-radius: 50% !important;
  object-fit: cover !important;
  width: 28px !important;
  height: 28px !important;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (max-width: 767px) {
  .premium-picker {
    align-items: flex-end;
  }

  .premium-picker__modal {
    width: 100%;
    max-width: 100%;
    height: 92vh;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    padding-top: 8px;
  }

  .premium-picker__modal--source {
    height: auto;
    max-height: 60vh;
    min-height: 300px;
  }

  .premium-picker.show .premium-picker__modal {
    transform: translateY(0);
  }

  .premium-picker__swipe-handle {
    display: block;
  }

  .premium-picker__header {
    padding: 16px 20px 14px;
    cursor: grab;
    touch-action: none;
  }

  .premium-picker__close {
    width: 30px;
    height: 30px;
  }

  .premium-picker__title {
    font-size: 17px;
  }

  .premium-picker__search-wrapper {
    padding: 0 16px 10px;
  }

  .premium-picker__search {
    height: 36px;
    font-size: 17px;
  }

  .premium-picker__letters {
    display: none;
  }

  .premium-picker__section {
    padding: 10px 16px 6px;
  }

  .premium-picker__recent-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .premium-picker__country {
    padding: 11px 16px;
    min-height: 52px;
  }

  .premium-picker__country::after {
    left: 66px;
    right: 16px;
  }

  .premium-picker__list {
    padding: 4px 0 env(safe-area-inset-bottom, 20px);
  }
}

.route-select .flag.flag-circle,
.route-select img.flag-circle {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  font-size: inherit !important;
  line-height: inherit !important;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  flex-shrink: 0 !important;
  margin-right: 0 !important;
}

@media (min-width: 768px) {
  .route-select .flag.flag-circle,
  .route-select img.flag-circle {
    width: 28px !important;
    height: 28px !important;
  }
}

@media (min-width: 1024px) {
  .route-select .flag.flag-circle,
  .route-select img.flag-circle {
    width: 30px !important;
    height: 30px !important;
  }
}
