/* ── Root anchor — fixed to viewport, nothing else matters ── */
#wppf-root {
    position: fixed !important;
    bottom: 78px !important;
    right: 78px !important;
    z-index: 8 !important;
    width: 0;
    height: 0;
    /* isolation stops theme transforms from breaking fixed children */
    isolation: isolate;
}

/* ── Feedback Button ── */
#wppf-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: auto;
    height: 40px;
    border-radius: 10px;
    background: rgba(13, 27, 46, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: 1.5px solid #1e3a55;   
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--sf-font)!important;
    letter-spacing: 0.3px;
    box-shadow: none;
    transition: border-color 0.25s, box-shadow 0.25s, color 0.25s;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}
#wppf-btn:hover {
    background: rgba(13, 27, 46, 0.85); /* no fill change */
    border-color: #38bdf8;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45),
              0 0 0 3px rgba(56,189,248,0.12);
  color: #38bdf8;
}
#wppf-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#wppf-btn:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 3px;
}

#wppf-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    fill: currentColor;
    pointer-events: none;
}

/* ── Glow pulse for tour ── */
@keyframes wppf-glow-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(56,189,248,0.7); }
    50%  { box-shadow: 0 0 0 14px rgba(56,189,248,0.0); }
    100% { box-shadow: 0 0 0 0    rgba(56,189,248,0.7); }
}
#wppf-btn.wppf-tour-active {
    animation: wppf-glow-pulse 1.4s ease-in-out infinite;
}

/* ── Tour tooltip ── */
#wppf-tour {
  position: absolute;
  bottom: -8px;
  right: 62px;
  background: #0d1829;                          /* matches modal bg */
  color: #94b8cc;                               /* muted blue-gray text */
  border: 1px solid #1e3a55;                    /* same muted border as modal */
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;                              /* tighter than before */
  font-family: var(--sf-font) !important;
  width: 190px;                                 /* slightly narrower */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);   /* depth via shadow, not color */
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: normal;
  /* removed backdrop-filter — not needed at this size */
}

#wppf-tour.wppf-tour-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Arrow — match new border color */
#wppf-tour::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  
  border: 8px solid transparent;
  border-right: 0;
  border-left-color: #1e3a55;                 /* muted, was #38bdf8 */
}

/* Close button */
#wppf-tour-close {
  background: none;
  border: none;
  color: #2f567a;
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}
#wppf-tour-close:hover { color: #38bdf8; }

/* ── Slide-up panel — anchored above button ── */
#wppf-overlay {
    position: absolute;
    bottom: 62px;
    right: 0;
    width: 320px;
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), opacity 0.22s ease;
    /* keep hidden but in DOM so animation works */
    visibility: hidden;
}
#wppf-overlay.wppf-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* ── Modal Card ── */
#wppf-modal {
  background: #111c2e;
  border: 1px solid #1e3a55;                   /* muted, not glowing */
  border-radius: 14px;
  padding: 22px 22px 18px;
  position: relative;
  font-family: var(--sf-font) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);  /* elevation via shadow, not border */
}

/* Arrow pointing down toward button */
#wppf-modal::after {
    content: '';
    position: absolute;
    bottom: -9px;
    right: 18px;
    border: 9px solid transparent;
    border-bottom: 0;
   border-top-color: #1e3a55;
}
#wppf-modal::before {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 19px;
    z-index: 1;
    border: 8px solid transparent;
    border-bottom: 0;
    border-top-color: #0d1829;      
}

#wppf-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 16px;
    color: #4a7fa5;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}
#wppf-modal-close:hover { color: #f5a623; }

/* Title stays blue but softer */
#wppf-modal-title {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  color: #38bdf8 !important;                   /* keep — this is fine, matches table headers */
}

/* Subtitle — muted gray, not white */
.wppf-subtitle {
  margin: 0;
  font-size: 12px;
  color: #5a7e9a;
}

#wppf-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #1e3a5f;                  /* slightly more visible than before */
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  color: #e2eaf4;
  background: #060f1c;                          /* deeper dark for inner contrast */
  transition: border-color 0.2s;
  outline: none;
  min-height: 90px;
}
#wppf-textarea::placeholder { color: #3a6080; }
#wppf-textarea:focus {
  border-color: #38bdf8;                        /* was same as resting — now lights up */
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

#wppf-char-count {
    text-align: right;
    font-size: 11px;
    color: #2f567a;
    margin: 4px 0 10px;
}

#wppf-msg {
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 18px;
    border-radius: 6px;
}
#wppf-msg.wppf-success {
    color: #34d399;
    background: rgba(52,211,153,0.1);
    padding: 7px 10px;
}
#wppf-msg.wppf-error {
    color: #f87171;
    background: rgba(248,113,113,0.1);
    padding: 7px 10px;
}

/* Submit — text style, not filled */
#wppf-submit {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #38bdf8;
  border: 1px solid #1e3a55;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: 0.3px;
}
#wppf-submit:hover:not(:disabled) {
  border-color: #38bdf8;
  color: #7dd3fc;
  background: rgba(56,189,248,0.06);
}
#wppf-submit:disabled { opacity: 0.5; cursor: not-allowed; }

#wppf-modal-header {
  margin: -22px -22px 16px -22px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);       /* barely-there white tint */
  border-bottom: 1px solid #1e3a55;
  border-radius: 12px 12px 0 0;
}