/**
 * @file
 * Styles for the floating form link.
 * Matches the style of sticky-tools and sticky-glossary buttons.
 */

.floating-form-link {
  position: fixed;
  right: 0;
  /* Match theme spacing: Tools (35%), Glossary (55%), Feedback (75%). */
  top: 78%;
  transform: translateY(-50%) rotate(180deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  /* Keep above most content; match the theme sticky buttons layering. */
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 1;
}

.floating-form-link.hidden {
  display: none !important;
}

.floating-form-link__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 40px 10px;
  background-color: #009bc9;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0 12px 12px 0;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.floating-form-link__button:hover,
.floating-form-link__button:focus {
  background-color: #006280;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-form-link__button:active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* Responsive adjustments - matches sticky-tools and sticky-glossary */
@media (max-width: 900px) {
  /* Make room for 3 stacked sticky buttons on mobile. */
  /* Use !important to reliably override the theme's mobile rules. */
  body .sticky-tools { bottom: 440px !important; }
  body .sticky-glossary { bottom: 260px !important; }

  .floating-form-link {
    top: auto;
    /* Keep the same 140px spacing as Tools (400) -> Glossary (260) -> Feedback (120). */
    bottom: 112px !important;
    right: 0;
    transform: translateY(0) rotate(180deg);
  }
  
  .floating-form-link__button {
    padding: 30px 8px;
    font-size: 14px;
    border-radius: 0 12px 12px 0;
  }
}

/* Hide on admin pages if desired */
.path-admin .floating-form-link {
  display: none;
}
