/*
 * "شخصی سازی ایموجی" modal (settings page).
 * Mirrors the in-game reaction panel theme from lobby.css (.modal /
 * .emoji-modal / .emoji-grid), restated here because lobby.css is not loaded
 * on the app-shell pages.
 */
.ec-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000030;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  direction: rtl;
}
.ec-overlay.is-open {
  display: flex;
}
.ec-modal {
  width: 92%;
  max-width: min(92vw, 360px);
  max-height: min(85vh, 620px);
  overflow-y: auto;
  background: #1c1c1c;
  border: 1px solid #444;
  border-radius: 18px;
  color: #fff;
  padding: 16px;
  box-sizing: border-box;
  font-family: 'Iranian Sans', Tahoma, sans-serif;
}
.ec-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ec-modal-tabs {
  display: flex;
  gap: 6px;
  flex: 1;
}
.ec-modal-tab {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.ec-modal-tab.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
}
.ec-modal-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: #444;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.ec-modal-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}
.ec-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: auto;
  gap: 6px;
}
.ec-item {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.ec-item.is-off {
  opacity: 0.4;
  filter: grayscale(100%);
}
.ec-item-check {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 15px;
  height: 15px;
  margin: 0;
  z-index: 2;
  accent-color: #B80E13;
  cursor: pointer;
}
.ec-preview {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.ec-preview--media {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ec-preview--media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ec-grid-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 8px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}
.ec-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 8px;
  font-size: 13px;
}
.ec-pagination button {
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: #B80E13;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
}
.ec-pagination button:disabled {
  filter: grayscale(100%);
  opacity: 0.45;
  cursor: not-allowed;
}
