/* Eldalil Chatwoot — WhatsApp stickers in the reply box (stk1) */

.estk-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  opacity: 0.85;
}
.estk-toggle:hover { background: rgba(148, 163, 184, 0.18); opacity: 1; }
.estk-toggle.is-active { background: #f7edf0; color: #7a2140; opacity: 1; box-shadow: inset 0 0 0 1px #ebd3da; }

.estk-panel {
  --estk-accent: #7a2140;
  position: fixed;
  z-index: 60;
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  box-sizing: border-box;
  background: #fff;
  color: #0f172a;
  border: 1px solid #ebd3da;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  direction: rtl;
  font-family: 'Cairo', 'Almarai', system-ui, sans-serif;
}
.estk-panel[hidden] { display: none; }
.estk-panel.is-mobile { width: auto; }
.estk-panel.is-sending .estk-grid { opacity: 0.55; pointer-events: none; }

.estk-head { display: flex; align-items: center; justify-content: space-between; }
.estk-title { font-weight: 700; font-size: 14px; }
.estk-close {
  width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; font-size: 15px; cursor: pointer; color: #64748b;
}
.estk-close:hover { background: #f1f5f9; }

.estk-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.estk-tabs::-webkit-scrollbar { display: none; }
.estk-tab {
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  padding: 5px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}
.estk-tab.is-active { background: var(--estk-accent); border-color: var(--estk-accent); color: #fff; }

.estk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 90px;
  transition: opacity 120ms ease;
}
.estk-item {
  aspect-ratio: 1 / 1;
  padding: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.estk-item:hover { background: #f7edf0; }
.estk-item:active { transform: scale(0.94); }
.estk-item img { width: 100%; height: 100%; object-fit: contain; display: block; }

.estk-empty { grid-column: 1 / -1; font-size: 13px; color: #94a3b8; padding: 18px 8px; text-align: center; }
.estk-note { font-size: 11px; color: #94a3b8; text-align: center; flex-shrink: 0; }

.estk-toast {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  max-width: 90%;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  text-align: center;
  pointer-events: none;
}
.estk-toast[hidden] { display: none; }

@media (max-width: 767px) {
  .estk-grid { grid-template-columns: repeat(4, 1fr); }
}
