/* =====================================================
   SahiHisab — Feedback Widget Styles
   Floating pill + expandable panel
   ===================================================== */

/* ── Floating pill ── */
.fb-pill {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fb-pill:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.fb-pill:active {
  transform: scale(0.95);
}

/* ── Panel ── */
.fb-panel {
  position: fixed;
  bottom: 80px;
  right: 16px;
  z-index: 9998;
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 14px;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.fb-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Panel header ── */
.fb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fb-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}
.fb-close:hover {
  background: var(--hover);
}

/* ── Emoji row ── */
.fb-emoji-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.fb-emoji {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 10px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 52px;
  min-height: 52px;
}
.fb-emoji:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 59,130,246), 0.06);
}
.fb-emoji.selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb, 59,130,246), 0.1);
  transform: scale(1.08);
}
.fb-emoji-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.fb-emoji-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Textarea ── */
.fb-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  outline: none;
  background: var(--card);
  color: var(--foreground);
  box-sizing: border-box;
  min-height: 56px;
  transition: border-color 0.2s;
}
.fb-textarea:focus {
  border-color: var(--primary);
}

/* ── Actions ── */
.fb-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.fb-submit {
  padding: 8px 20px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  min-height: 40px;
  transition: background 0.15s, transform 0.1s;
}
.fb-submit:hover {
  filter: brightness(1.1);
}
.fb-submit:active {
  transform: scale(0.97);
}
.fb-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Thank you ── */
.fb-thankyou {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  text-align: center;
}

/* ── Text area wrapper ── */
.fb-text-area {
  margin-bottom: 2px;
}

/* ── Mobile: pill above bottom nav ── */
@media (max-width: 768px) {
  .fb-pill {
    bottom: 76px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  .fb-panel {
    bottom: 76px;
    right: 8px;
    left: 8px;
    width: auto;
  }
}

/* ── Don't show when print ── */
@media print {
  .fb-pill, .fb-panel { display: none !important; }
}
