/* Emoji Picker Sheet Styling */
.emoji-picker-sheet .sheet-modal-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.emoji-picker-sheet .page-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  box-sizing: border-box;
  padding: 0 !important;
  overflow: hidden;
}

.emoji-picker-sheet .ep-categories {
  background: var(--f7-sheet-bg-color, #fff);
  border-bottom: 1px solid var(--f7-list-border-color, rgba(0, 0, 0, 0.1));
  flex-shrink: 0;
}

.emoji-picker-sheet .ep-categories ul {
  display: flex;
  list-style: none;
  padding: 8px 32px 8px 12px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  overflow: hidden;
}

.emoji-picker-sheet .ep-categories li {
  list-style: none;
  cursor: pointer;
  font-size: 22px;
  opacity: 0.5;
  transition: opacity 0.2s;
  flex: 1;
  text-align: center;
}

.emoji-picker-sheet .ep-categories li.ep-active {
  opacity: 1;
}

.emoji-picker-sheet .ep-container-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--f7-list-subtitle-text-color, #8e8e93);
  padding: 12px 16px 6px 16px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Raster: Genau 7 Spalten (1/7 Breite pro Emoji), quadratisch und auf 100% limitiert */
.emoji-picker-sheet .ep-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 4px !important;
  padding: 4px 32px 16px 12px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

.emoji-picker-sheet .ep-grid li {
  list-style: none !important;
  margin: 0 !important;
  width: auto !important;
  aspect-ratio: 1 / 1 !important;
}

/* 32px Schriftgröße ausschließlich für die Emojis im Grid */
.emoji-picker-sheet .ep-item {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.15s;
}

.emoji-picker-sheet .ep-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.emoji-picker-sheet .ep-search {
  padding: 10px 16px;
  position: relative;
  flex-shrink: 0;
}

.emoji-picker-sheet .ep-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: 8px;
  border: none;
  background: var(--f7-input-bg-color, #efeff4);
  font-size: 15px;
  color: var(--f7-text-color, #000);
  box-sizing: border-box;
}

.emoji-picker-sheet .ep-search svg {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: #8e8e93;
}

.emoji-picker-sheet .ep-search i {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 18px;
  color: #8e8e93;
  cursor: pointer;
}

.emoji-picker-sheet .ep-hidden-emoji {
  display: none !important;
}

/* Swiper-Container und Slides exakt an Sheet-Breite fesseln */
.emoji-picker-sheet .ep-all-categories.swiper {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
  height: auto !important;
  box-sizing: border-box;
  overflow: hidden !important;
}

.emoji-picker-sheet .ep-all-categories.swiper .swiper-wrapper {
  width: 100% !important;
  box-sizing: border-box;
}

.emoji-picker-sheet .swiper-slide.ep-category {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden !important;
}

/* Verhindert das Auseianderreißen von zusammengesetzten Emojis */
.emoji-picker-sheet .ep-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 8px;
  text-decoration: none;
  box-sizing: border-box !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
}

.emoji-picker-sheet .ep-emoji-char {
  display: inline-block;
  unicode-bidi: isolate;
  font-variant-emoji: emoji;
  transform: scale(1); /* Zwingt iOS dazu, das zusammengesetzte Emoji als einheitlichen Block zu rendern */
}

.emoji-picker-sheet .ep-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 8px;
  text-decoration: none;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Erlaubt dem Inhalt die Touch-Events und verhindert das Blockieren durch Framework7 */
.emoji-picker-sheet .sheet-modal-inner {
  touch-action: pan-y;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.emoji-picker-sheet .page-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Der Griff oben bleibt exklusiv für die Wisch-zum-Schließen-Geste */
.emoji-picker-sheet .swipe-handler {
  touch-action: none; 
}

.emoji-picker-sheet .swipe-handler {
    width: 100%;
    height: 10px;
    border-radius: 3px;
    /* margin: 6px auto; */
    background: var(--f7-sheet-bg-color, #fff);
    position: relative;
}

.emoji-picker-sheet .swipe-handler:after {
    content: '';
    width: 36px;
    height: 6px;
    position: absolute;
    left: 50%;
    top: 13px;
    margin-left: -18px;
    margin-top: -3px;
    border-radius: 3px;
    background: #666;
}

