/* Reaction Picker — 6x6 emoji grid overlay */

:root {
  --rp-bg: rgba(0, 0, 0, 0.6);
  --rp-panel-bg: #1a1a2e;
  --rp-panel-border: rgba(255, 255, 255, 0.08);
  --rp-cell-hover: rgba(255, 255, 255, 0.1);
  --rp-cell-active: rgba(99, 102, 241, 0.25);
  --rp-cell-active-border: rgba(99, 102, 241, 0.6);
  --rp-cell-disabled: 0.3;
  --rp-text: #e2e8f0;
  --rp-text-muted: #94a3b8;
  --rp-message-bg: rgba(239, 68, 68, 0.9);
  --rp-radius: 16px;
  --rp-cell-size: 48px;
}

[data-theme="light"] {
  --rp-bg: rgba(0, 0, 0, 0.4);
  --rp-panel-bg: #ffffff;
  --rp-panel-border: rgba(0, 0, 0, 0.08);
  --rp-cell-hover: rgba(0, 0, 0, 0.05);
  --rp-cell-active: rgba(99, 102, 241, 0.12);
  --rp-cell-active-border: rgba(99, 102, 241, 0.4);
  --rp-text: #1e293b;
  --rp-text-muted: #64748b;
}

.reaction-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rp-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: rp-fade-in 0.15s ease-out;
}

@keyframes rp-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reaction-picker-panel {
  background: var(--rp-panel-bg);
  border: 1px solid var(--rp-panel-border);
  border-radius: var(--rp-radius);
  padding: 16px;
  max-width: 340px;
  width: 90vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: rp-scale-in 0.15s ease-out;
}

@keyframes rp-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reaction-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}

.reaction-picker-title {
  color: var(--rp-text);
  font-size: 14px;
  font-weight: 600;
  font-family: system-ui, -apple-system, sans-serif;
}

.reaction-picker-hint {
  color: var(--rp-text-muted);
  font-size: 12px;
  font-family: system-ui, -apple-system, sans-serif;
}

.reaction-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.reaction-picker-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--rp-cell-size);
  height: var(--rp-cell-size);
  font-size: 22px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  position: relative;
  padding: 0;
  line-height: 1;
}

.reaction-picker-cell:hover:not(:disabled) {
  background: var(--rp-cell-hover);
  transform: scale(1.15);
}

.reaction-picker-cell:active:not(:disabled) {
  transform: scale(0.95);
}

.reaction-picker-cell--active {
  background: var(--rp-cell-active);
  border-color: var(--rp-cell-active-border);
}

.reaction-picker-cell--disabled {
  opacity: var(--rp-cell-disabled);
  cursor: not-allowed;
}

.reaction-picker-cell[data-count]::after {
  content: attr(data-count);
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 9px;
  font-weight: 600;
  color: var(--rp-text-muted);
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--rp-panel-bg);
  padding: 0 3px;
  border-radius: 4px;
  line-height: 14px;
}

.reaction-picker-message {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--rp-message-bg);
  color: white;
  font-size: 12px;
  font-family: system-ui, -apple-system, sans-serif;
  border-radius: 8px;
  text-align: center;
  animation: rp-fade-in 0.15s ease-out;
}

/* Upload FAB (from gallery-integration.js) */
.gallery-upload-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
  z-index: 1000;
}

.gallery-upload-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.6);
}
