/* ── Q&A Widget ─────────────────────────────────────────── */

#qa-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9000;
}

#qa-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange, #E85D26);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
  color: #111;
  font-size: 1.4rem;
}
#qa-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,.35); }

#qa-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 360px;
  max-height: 520px;
  background: #1A2A40;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(.92) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
}
#qa-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.qa-header {
  padding: 1rem 1.1rem;
  background: #152233;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.qa-header h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1rem;
  letter-spacing: 1.5px;
  color: #E4E9F0;
  text-transform: uppercase;
}
.qa-close {
  background: none;
  border: none;
  color: rgba(228,233,240,.5);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: .2rem .4rem;
  border-radius: 4px;
  transition: color .2s;
}
.qa-close:hover { color: #E4E9F0; }

.qa-list {
  flex: 1;
  overflow-y: auto;
  padding: .75rem;
}
.qa-list::-webkit-scrollbar { width: 4px; }
.qa-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.qa-empty {
  text-align: center;
  color: rgba(228,233,240,.4);
  font-size: .85rem;
  padding: 2rem 1rem;
}

.qa-item {
  background: rgba(255,255,255,.05);
  border-radius: 8px;
  padding: .85rem;
  margin-bottom: .6rem;
  border-left: 3px solid var(--orange, #E85D26);
}
.qa-item-q {
  font-size: .88rem;
  font-weight: 600;
  color: #E4E9F0;
  margin-bottom: .5rem;
  line-height: 1.5;
}
.qa-item-a {
  font-size: .83rem;
  color: rgba(228,233,240,.7);
  line-height: 1.65;
}
.qa-item-a strong {
  color: var(--orange, #E85D26);
  font-size: .75rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  display: block;
  margin-bottom: .2rem;
}
.qa-own-delete {
  margin-top: .5rem;
  background: none;
  border: 1px solid rgba(220,53,69,.4);
  color: rgba(220,53,69,.7);
  border-radius: 4px;
  padding: .2rem .6rem;
  font-size: .75rem;
  cursor: pointer;
  transition: all .2s;
}
.qa-own-delete:hover { border-color: #dc3545; color: #dc3545; }

.qa-footer {
  padding: .75rem;
  background: #152233;
  flex-shrink: 0;
}
#qa-ask-btn {
  width: 100%;
  background: var(--orange, #E85D26);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: .65rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background .2s;
}
#qa-ask-btn:hover { background: #ff7a45; }

.qa-form { display: none; flex-direction: column; gap: .6rem; }
.qa-form.visible { display: flex; }

.qa-form textarea {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: #E4E9F0;
  font-family: inherit;
  font-size: .85rem;
  padding: .65rem;
  resize: none;
  height: 80px;
  outline: none;
  transition: border-color .2s;
}
.qa-form textarea:focus { border-color: var(--orange, #E85D26); }
.qa-form textarea::placeholder { color: rgba(228,233,240,.3); }

.qa-consent {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .75rem;
  color: rgba(228,233,240,.55);
  line-height: 1.5;
  cursor: pointer;
}
.qa-consent input { margin-top: .15rem; accent-color: var(--orange, #E85D26); }

.qa-form-submit {
  width: 100%;
  background: var(--orange, #E85D26);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: .6rem;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: background .2s;
}
.qa-form-submit:hover:not(:disabled) { background: #ff7a45; }
.qa-form-submit:disabled { opacity: .5; cursor: not-allowed; }

.qa-msg {
  font-size: .8rem;
  padding: .5rem .7rem;
  border-radius: 6px;
  text-align: center;
}
.qa-msg-success { background: rgba(40,167,69,.15); color: #6fcf97; }
.qa-msg-error   { background: rgba(220,53,69,.15);  color: #f08080; }

.qa-pending-item {
  background: rgba(232,93,38,.08);
  border-radius: 8px;
  padding: .75rem;
  margin-bottom: .6rem;
  border-left: 3px solid rgba(232,93,38,.4);
  font-size: .83rem;
  color: rgba(228,233,240,.6);
}
.qa-pending-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--orange, #E85D26);
  margin-bottom: .3rem;
}

@media (max-width: 420px) {
  #qa-panel { width: calc(100vw - 2rem); right: -1rem; }
}
