/* ==========================================================================
   iOS Emojis Style and Liquid Glass Picker Component
   ========================================================================== */

img.ios-emoji {
  display: inline-block;
  vertical-align: -0.22em;
  width: 1.3em;
  height: 1.3em;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.inline-ios-emoji {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.2em;
  display: inline-block;
}

/* Katta avatar emoji */
.ios-avatar-emoji {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}

.ios-avatar-lg {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.ios-podium-emoji {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
  animation: emojiBounce 2.5s infinite ease-in-out;
}

.ios-podium-crown {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 6px 16px rgba(245, 158, 11, 0.55));
  animation: crownBob 1.8s infinite ease-in-out;
}

@keyframes emojiBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.08); }
}

/* ==========================================================================
   Liquid Glass Emoji Picker Container
   ========================================================================== */
.ios-picker-wrapper {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.ios-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.ios-picker-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.ios-picker-search-box .ios-search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  opacity: 0.6;
  pointer-events: none;
}

.ios-picker-search-box input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: #ffffff;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.ios-picker-search-box input:focus {
  border-color: #818cf8;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.ios-picker-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ios-picker-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ios-preview-bubble {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ios-preview-bubble:hover {
  transform: scale(1.08) rotate(4deg);
}

.ios-preview-img {
  width: 34px !important;
  height: 34px !important;
}

.ios-preview-hint {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.2px;
}

/* Tabs */
.ios-picker-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ios-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 4px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ios-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ios-tab-btn.active {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ios-tab-icon {
  width: 22px !important;
  height: 22px !important;
}

/* Grid */
.ios-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.ios-picker-grid::-webkit-scrollbar {
  width: 5px;
}

.ios-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.ios-emoji-cell {
  background: transparent;
  border: none;
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ios-emoji-cell:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.2);
}

.ios-emoji-cell.selected {
  background: rgba(99, 102, 241, 0.5);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
  transform: scale(1.15);
}

.ios-cell-img {
  width: 26px !important;
  height: 26px !important;
}

@media (max-width: 480px) {
  .ios-picker-grid {
    grid-template-columns: repeat(6, 1fr);
    max-height: 190px;
  }
}
