/* Feedback button and form, added to every page by static/feedback.js.
   Colours and type follow the gold nav buttons and the dark content panels. */
/* Inside an existing nav group the page's own link styles apply; this only
   lines the buttons up side by side. */
.fb-nav-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Pages with no nav group get one button in the same top-right spot. */
.fb-standalone {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1001;
  background-color: rgba(212, 175, 55, 0.9);
  color: #1a1a1a;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}
.fb-standalone:hover {
  background-color: #d4af37;
  transform: scale(1.03);
}

/* Some pages style every <button> (300px wide on the home page, red hover on
   question pages). Shield the feedback buttons from those page-wide rules. */
button.fb-standalone,
.fb-panel button {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  line-height: normal;
  box-sizing: border-box;
}
.fb-panel .fb-close,
.fb-panel .fb-close:hover {
  background: none;
  transform: none;
  box-shadow: none;
}
.fb-panel .fb-submit:hover {
  transform: none;
}

.fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
}
.fb-overlay[hidden] {
  display: none;
}
.fb-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 26px 28px 22px;
  background-color: rgba(26, 26, 26, 0.97);
  border: 2px solid #8b7355;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
  color: #f0e6d2;
  font-family: 'Courier New', monospace;
  text-align: left;
}
.fb-panel h2 {
  margin: 0 0 6px 0;
  color: #d4af37;
  font-size: 22px;
}
.fb-intro {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: rgba(240, 230, 210, 0.8);
}
.fb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
.fb-panel .fb-close:hover {
  color: #f8d94e;
}
.fb-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px 0;
  padding: 0;
  border: none;
}
.fb-types legend,
.fb-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #c9a961;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fb-types legend {
  width: 100%;
}
.fb-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fb-type span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 8px;
  font-size: 13px;
  color: #f0e6d2;
  cursor: pointer;
}
.fb-type input:checked + span {
  background-color: rgba(212, 175, 55, 0.9);
  color: #1a1a1a;
  font-weight: bold;
}
.fb-type input:focus-visible + span {
  outline: 2px solid #f8d94e;
  outline-offset: 2px;
}
.fb-panel textarea,
.fb-panel input[type="email"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 14px 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #8b7355;
  border-radius: 8px;
  color: #f0e6d2;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}
.fb-panel textarea {
  min-height: 120px;
  resize: vertical;
}
.fb-panel textarea:focus,
.fb-panel input[type="email"]:focus {
  outline: none;
  border-color: #d4af37;
}
.fb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.fb-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fb-panel .fb-submit {
  background-color: rgba(212, 175, 55, 0.9);
  color: #1a1a1a;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
.fb-panel .fb-submit:hover {
  background-color: #d4af37;
}
.fb-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.fb-status {
  font-size: 13px;
  color: #f8d94e;
}
.fb-status.fb-error {
  color: #ff6b6b;
}
.fb-status a {
  color: #ffd700;
}
.fb-done {
  padding: 18px 0 6px;
  text-align: center;
}
.fb-done p {
  margin: 0 0 16px 0;
  font-size: 15px;
}

@media (max-width: 700px) {
  .fb-standalone {
    top: 12px;
    right: 12px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .fb-panel {
    padding: 22px 18px 18px;
  }
}
