/* Feedback Panel — scoped with .fb-* prefix */

/* ── Trigger button ── */
.fb-trigger {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9997;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--card, #FFFFFF);
  color: var(--text2, #4B5563);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 9999px;
  font-family: var(--sans, 'DM Sans', -apple-system, sans-serif);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s, background 0.2s;
}
.fb-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  background: var(--bg2, #EBEBEB);
}
.fb-trigger:active {
  transform: translateY(0) scale(0.98);
}
.fb-trigger svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.fb-hidden { display: none !important; }

/* ── Overlay ── */
.fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.fb-overlay.fb-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal ── */
.fb-modal {
  background: var(--card, #FFFFFF);
  border-radius: var(--radius-xl, 10px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  width: 440px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.fb-overlay.fb-open .fb-modal {
  transform: translateY(0) scale(1);
}

/* ── Header ── */
.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.fb-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #262626);
}
.fb-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3, #6B7280);
  padding: 4px;
  border-radius: var(--radius-sm, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-close:hover {
  background: var(--bg2, #EBEBEB);
  color: var(--text, #262626);
}

/* ── Body ── */
.fb-body {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Form fields ── */
.fb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fb-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #4B5563);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fb-select,
.fb-textarea {
  font-family: var(--sans, 'DM Sans', -apple-system, sans-serif);
  font-size: 14px;
  color: var(--text, #262626);
  background: var(--bg, #F2F2F2);
  border: 1px solid var(--border, #E5E7EB);
  border-radius: var(--radius-md, 6px);
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.fb-select:focus,
.fb-textarea:focus {
  border-color: var(--accent, #0369A1);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}
.fb-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}
.fb-page-context {
  font-size: 12px;
  color: var(--text3, #6B7280);
  background: var(--bg2, #EBEBEB);
  border-radius: var(--radius-sm, 4px);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-page-context svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ── Submit ── */
.fb-submit {
  align-self: flex-end;
  padding: 10px 24px;
  background: var(--accent, #0369A1);
  color: #fff;
  border: none;
  border-radius: var(--radius-md, 6px);
  font-family: var(--sans, 'DM Sans', -apple-system, sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.fb-submit:hover {
  background: var(--accent2, #0284C7);
}
.fb-submit:active {
  transform: scale(0.97);
}
.fb-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Success state ── */
.fb-success {
  text-align: center;
  padding: 32px 24px;
}
.fb-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--green, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-success-icon svg {
  width: 24px;
  height: 24px;
  color: #fff;
}
.fb-success-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #262626);
  margin-bottom: 6px;
}
.fb-success-msg {
  font-size: 13px;
  color: var(--text3, #6B7280);
  line-height: 1.5;
}
