/* Feedback / Enquiry — floating action button + modal.
   One shared stylesheet for every page (injected by index.php) so the
   widget looks identical across sections and only needs editing once. */

#feedbackBtn {
  --fb-cyan: #9BC7B2;
  --fb-violet: #EEE5D4;
  --fb-mint: #9BC7B2;
  /* dark.css makes every rounded-full button relative for its orbit effect;
     the FAB must stay pinned to the viewport. */
  position: fixed !important;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: visible !important;
  border: 1px solid transparent;
  color: #EEE5D4;
  background:
    linear-gradient(145deg, rgba(10, 15, 20, .96), rgba(14, 10, 26, .97)) padding-box,
    linear-gradient(140deg, rgba(155, 199, 178, .85), rgba(238, 229, 212, .55) 52%, rgba(155, 199, 178, .7)) border-box;
  box-shadow:
    0 12px 34px -12px rgba(155, 199, 178, .55),
    0 8px 26px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .09);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, padding .25s ease;
}

/* soft radar pulse — proves the button is alive without being noisy */
#feedbackBtn::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid rgba(155, 199, 178, .5);
  background: none !important;
  transform: none;
  animation: fb-ping 3.6s cubic-bezier(0, 0, .2, 1) infinite;
  pointer-events: none;
}

#feedbackBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(155, 199, 178, .14), transparent 45%, rgba(238, 229, 212, .12));
  pointer-events: none;
}

#feedbackBtn svg {
  color: #EEE5D4;
  filter: drop-shadow(0 0 8px rgba(155, 199, 178, .45));
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
}

#feedbackBtn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 46px -12px rgba(155, 199, 178, .7),
    0 10px 30px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

#feedbackBtn:hover svg { transform: rotate(-8deg) scale(1.07); }
#feedbackBtn:active { transform: translateY(0) scale(.96); }

#feedbackBtn:focus-visible {
  outline: 2px solid var(--fb-cyan) !important;
  outline-offset: 4px;
}

/* desktop: grow into a labelled pill so the affordance is obvious */
@media (min-width: 640px) {
  #feedbackBtn {
    width: auto;
    min-width: 56px;
    padding: 0 20px 0 17px;
    gap: 10px;
  }
  #feedbackBtn::after {
    content: "Feedback";
    position: static;
    inset: auto;
    z-index: auto;
    background: none;
    font: 600 14.5px/1 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: .015em;
    color: #EEE5D4;
  }
}

@keyframes fb-ping {
  0%   { opacity: .55; transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.55); }
  100% { opacity: 0;   transform: scale(1.55); }
}

/* ---------- modal ---------- */

#feedbackModal {
  background: rgba(2, 3, 5, .66) !important;
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

#feedbackModal.flex { animation: fb-fade .18s ease-out both; }

#feedbackModal > div {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(238, 229, 212, .13);
  background:
    linear-gradient(90deg, transparent, rgba(238, 229, 212, .7), rgba(238, 229, 212, .45), transparent) top / 100% 1px no-repeat,
    linear-gradient(160deg, rgba(17, 20, 25, .99), rgba(6, 7, 10, .99)) !important;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, .7),
    0 0 0 1px rgba(155, 199, 178, .05),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  animation: fb-pop .24s cubic-bezier(.22, 1, .36, 1) both;
}

#feedbackModal > div > .flex.items-center.justify-between {
  padding: 15px 18px 13px;
}

#feedbackModal h2 {
  font-weight: 650;
  letter-spacing: -.01em;
  background: linear-gradient(90deg, #EEE5D4, #D9CFBB);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#feedbackCloseBtn {
  border-radius: 10px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
#feedbackCloseBtn:hover {
  background: rgba(238, 229, 212, .08);
  color: #fff !important;
  transform: rotate(90deg);
}

#feedbackForm label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #B9B09B;
}

#feedbackForm input,
#feedbackForm select,
#feedbackForm textarea {
  border-radius: 12px;
  padding: 10px 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#feedbackForm textarea { min-height: 118px; line-height: 1.55; }

#feedbackForm input:focus,
#feedbackForm select:focus,
#feedbackForm textarea:focus {
  border-color: rgba(238, 229, 212, .6) !important;
  box-shadow: 0 0 0 3px rgba(238, 229, 212, .12) !important;
}

#feedbackForm .text-xs { letter-spacing: .02em; }

#feedbackSubmitBtn {
  border: 0;
  border-radius: 12px;
  padding: 10px 22px;
  color: var(--oat, #EEE5D4);
  font-weight: 700;
  background: linear-gradient(135deg, var(--forest-hover, #2A6347), var(--forest, #1D4A35));
  box-shadow: 0 10px 26px -12px rgba(155, 199, 178, .75), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
#feedbackSubmitBtn:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -12px rgba(155, 199, 178, .9), inset 0 1px 0 rgba(255, 255, 255, .55);
}
#feedbackSubmitBtn:active:not(:disabled) { transform: translateY(0) scale(.985); }
#feedbackSubmitBtn:disabled { opacity: .55; cursor: not-allowed; }

#feedbackCancelBtn {
  border-radius: 12px;
  border-color: rgba(238, 229, 212, .14) !important;
  color: #D9CFBB;
  background: rgba(238, 229, 212, .03);
}
#feedbackCancelBtn:hover { background: rgba(238, 229, 212, .08); color: #fff; }

#feedbackStatus:not(.hidden) { border: 1px solid transparent; }
#feedbackStatus.bg-red-50   { background: rgba(127, 29, 29, .28) !important; color: #F2462E !important; border-color: rgba(242, 70, 46, .25); }
#feedbackStatus.bg-green-50 { background: rgba(6, 78, 59, .32) !important; color: #9BC7B2 !important; border-color: rgba(52, 211, 153, .25); }

@keyframes fb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fb-pop {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #feedbackBtn, #feedbackBtn svg, #feedbackModal > div, #feedbackModal.flex { animation: none !important; transition: none !important; }
  #feedbackBtn::before { display: none; }
  #feedbackBtn:hover { transform: none; }
}
