/* Floating call to action menu (position floating-cta)
 * Tabs on the right edge of the screen.
 * Desktop: open, all buttons equally wide.
 * Mobile/tablet: icons only.
 * A grey arrow tab above the buttons collapses/expands the menu
 * (state kept in localStorage, see templates/emogy/index.php).
 * All buttons grey, red on hover/focus.
 */

.floating-cta {
  position: fixed;
  z-index: 200;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

/* Collapse / expand arrow */
.floating-cta-toggle {
  position: absolute;
  right: 0;
  bottom: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 36px;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  border-radius: 5px 0 0 0;
  color: #333;
  background-color: #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background-color 0.3s, border-radius 0.3s;
}

.floating-cta-toggle:hover,
.floating-cta-toggle:focus-visible {
  background-color: #d2d2d2;
}

.floating-cta-toggle:before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1rem;
  content: "\f054"; /* chevron-right: collapse */
  transition: transform 0.3s;
}

.floating-cta.is-collapsed .floating-cta-toggle {
  border-radius: 5px 0 0 5px;
}

.floating-cta.is-collapsed .floating-cta-toggle:before {
  transform: rotate(180deg); /* chevron-left: expand */
}

.floating-cta-panel {
  transition: transform 0.3s, visibility 0.3s;
}

.floating-cta.is-collapsed .floating-cta-panel {
  transform: translateX(100%);
  visibility: hidden;
}

.floating-cta ul.mod-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.floating-cta li {
  margin: 0;
  padding: 0;
}

.floating-cta li a {
  display: flex;
  align-items: center;
  height: 52px;
  color: #fff;
  background-color: #333;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

.floating-cta li a:link,
.floating-cta li a:visited {
  color: #fff;
  text-decoration: none;
}

.floating-cta li a:hover,
.floating-cta li a:focus-visible {
  background-color: #e30613;
  color: #fff;
}

.floating-cta li a:before {
  flex: 0 0 52px;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.25rem;
  content: "\f0e0";
  text-align: center;
}

.floating-cta li:nth-child(1) a:before {
  content: "\f15c";
}

.floating-cta li:nth-child(2) a:before {
  content: "\f0e0";
}

.floating-cta li:nth-child(3) a:before {
  content: "\f0eb";
}

/* Desktop: open */
@media (min-width: 992px) {
  .floating-cta li a {
    font-size: 1rem;
    padding-right: 20px;
  }
}

/* Mobile/tablet: icons only (label stays readable for screen readers) */
@media (max-width: 991px) {
  .floating-cta li a {
    width: 48px;
    height: 48px;
    font-size: 0;
  }

  .floating-cta li a:before {
    flex-basis: 48px;
    font-size: 1.15rem;
  }

  .floating-cta-toggle {
    width: 48px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-cta-panel,
  .floating-cta-toggle,
  .floating-cta-toggle:before {
    transition: none;
  }
}

@media print {
  .floating-cta {
    display: none;
  }
}
