/* shared/report-bugreport.css — site-wide "Feedback" floating button + modal
   (Bug Tracker / Feature Request). Loaded on every page; classes are
   namespaced with "abr-" (Altitude Bug Report) and use !important on
   layout-critical rules so this widget looks and behaves the same no
   matter which page's own CSS is also loaded. */

#abr-fab {
  position: fixed !important;
  bottom: 22px !important;
  right: 22px !important;
  z-index: 999999 !important;
  height: 46px;
  width: auto;
  border-radius: 23px;
  background: var(--brand-blue, #3a7bc8);
  color: var(--text-on-brand, #fff);
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.28), 0 0 0 0 rgba(58,123,200,.4);
  cursor: pointer;
  display: none; /* shown via JS once a session is confirmed */
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
  padding: 0 20px;
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: 'Roboto', -apple-system, sans-serif;
}
#abr-fab.abr-visible { display: flex; }
#abr-fab:hover  { transform: scale(1.08); box-shadow: 0 6px 22px rgba(0,0,0,.35); }
#abr-fab:active { transform: scale(0.96); }

/* Fab dock: parked off to the side until the cursor is in the bottom-right
   corner — see the matching block in shared/report-theme-toggle.css for the full
   explanation. ".fab-dock-open" is toggled on this and the other two fabs
   (#rn-fab, #rt-fab) together by the single listener in
   shared/report-theme-toggle.js. Fine-pointer/hover devices only, so touch
   hardware keeps the always-visible resting state above. */
@media (hover: hover) and (pointer: fine) {
  #abr-fab {
    transform: translateX(40px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease, box-shadow .15s ease, background .15s ease;
  }
  #abr-fab.fab-dock-open { transform: translateX(0); opacity: 1; pointer-events: auto; }
}

#abr-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999998 !important;
  background: rgba(13, 13, 26, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, 'Roboto', sans-serif;
}
#abr-backdrop.abr-visible { display: flex; }

#abr-card {
  position: relative;
  background: var(--bg-surface, #fff);
  border-radius: 14px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 0;
  color: var(--text-primary-alt, #1f2430);
}

.abr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-faint, #eee);
}
.abr-title {
  font-family: 'Roboto', -apple-system, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary, #333333);
}
.abr-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted, #9ca3af);
  padding: 4px;
}
.abr-close:hover { color: var(--text-tertiary, #374151); }

.abr-body { padding: 18px 20px; }
.abr-field { margin-bottom: 14px; }
.abr-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint, #6b7280);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.abr-select, .abr-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--border-subtle, #e5e7eb);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: -apple-system, 'Roboto', sans-serif;
  color: var(--text-primary-alt, #1f2430);
  background: var(--bg-surface, #fff);
}
.abr-select:focus, .abr-textarea:focus { outline: none; border-color: var(--brand-blue, #3a7bc8); }
.abr-textarea { resize: vertical; min-height: 90px; }
.abr-hint { font-size: 11px; color: var(--text-muted, #9ca3af); margin-top: 4px; }
.abr-error { font-size: 12px; color: var(--status-error, #dc2626); min-height: 16px; margin-top: 6px; }

.abr-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-faint, #eee);
}
.abr-btn {
  font-family: -apple-system, 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  border: none;
}
.abr-btn-cancel { background: var(--bg-subtle, #f3f4f6); color: var(--text-tertiary, #374151); }
.abr-btn-cancel:hover { background: var(--border-subtle, #e5e7eb); }
.abr-btn-submit { background: var(--brand-blue, #3a7bc8); color: var(--text-on-brand, #fff); }
.abr-btn-submit:hover:not(:disabled) { background: var(--brand-blue-dark, #0b5394); }
.abr-btn-submit:disabled { opacity: .55; cursor: not-allowed; }

.abr-success {
  padding: 40px 24px;
  text-align: center;
}
.abr-success-icon { font-size: 38px; margin-bottom: 10px; }
.abr-success-text { font-size: 14px; color: var(--text-tertiary, #374151); font-weight: 500; }

@media (max-width: 480px) {
  #abr-fab { bottom: 16px !important; right: 16px !important; height: 42px; padding: 0 16px; font-size: 12px; }
}
