/* =========================================
   Shared floating button styling
   ========================================= */

.floating-contribute,
.floating-volunteer {
  position: fixed;
  right: 0;
  z-index: 1000;

  display: inline-flex;
  box-sizing: border-box;

  align-items: center;
  justify-content: center;
  padding: 0.50rem 1rem;

  color: #f9f9f8;
  border: 1px solid #000000;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.28);

  font-family: Geneva, Tahoma, sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;

  transform: translateY(-50%);

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Donate: lower portion of the first third */

.floating-contribute {
  top: 30%;
  background: #9e0d0b;
}

/* Volunteer: upper portion of the final third */

.floating-volunteer {
  top: 70%;
  background: #315df4;
}

/* Shared hover and focus behavior */

.floating-contribute:hover,
.floating-contribute:focus-visible,
.floating-volunteer:hover,
.floating-volunteer:focus-visible {
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.34);
}

.floating-contribute:hover,
.floating-contribute:focus-visible {
  background: #7c0908;
}

.floating-volunteer:hover,
.floating-volunteer:focus-visible {
  background: #244bd3;
}

.floating-contribute:focus-visible,
.floating-volunteer:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -5px;
}

/* Keep both labels visible */

.floating-contribute span,
.floating-volunteer span {
  display: inline;
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
}

/* Hide floating actions throughout the homepage */
body.is-home .floating-contribute,
body.is-home .floating-volunteer {
  display: none;
}

/* Hide floating actions throughout the contribution page */
body.is-finance .floating-contribute,
body.is-finance .floating-volunteer {
  display: none;
}

/* Hide floating actions throughout the volunteer page */
body.is-volunteer .floating-contribute,
body.is-volunteer .floating-volunteer {
  display: none;
}

/* Hide floating actions throughout the Campain Executive Team page */
body.is-leadership .floating-contribute,
body.is-leadership .floating-volunteer {
  display: none;
}

/* Hide floating actions throughout the Campain Coordination Team page */
body.is-cabinet .floating-contribute,
body.is-cabinet .floating-volunteer {
  display: none;
}

/* =========================================
   Tablets
   ========================================= */

@media (max-width: 900px) {
  .floating-contribute,
  .floating-volunteer {
    padding: 0.30rem 0.7rem;
    font-size: 0.90rem;
    letter-spacing: 0.07em;
  }

  .floating-contribute {
    top: 30%;
  }

  .floating-volunteer {
    top: 70%;
  }
}

/* =========================================
   Mobile phones
   ========================================= */

@media (max-width: 600px) {
  .floating-contribute,
  .floating-volunteer {
    min-width: 0;
    padding: 0.28rem 0.5rem;
    border-radius: 999px 0 0 999px;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .floating-contribute {
    top: 30%;
  }

  .floating-volunteer {
    top: 70%;
  }
}