/* ===========================================
   SHARED PROMPT (Volunteer/Home/Companies)
=========================================== */

.volunteer-prompt {
  position: fixed;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%) translateY(16px);

  /* KEEP ORIGINAL BACKGROUND */
  background: rgba(10, 10, 25, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  padding: 0.8rem 1.4rem;
  border-radius: 999px;

  display: flex;
  align-items: center;
  gap: 0.95rem;

  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 999;

  /* prevent bleed */
  overflow: hidden;
}

/* Active state (works for all prompts) */
.volunteer-prompt.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Text */
.prompt-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Actions */
.prompt-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* ===========================================
   BUTTONS (anchors + buttons)
=========================================== */

.volunteer-prompt .btn-pill {
  /* works for <a> and <button> */
  appearance: none;
  -webkit-appearance: none;

  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;

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

/* PRIMARY (gradient default) */
.volunteer-prompt .btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border: none;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* OUTLINE (subtle glass) */
.volunteer-prompt .btn-outline {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

/* HOVER: both turn solid purple */
.volunteer-prompt .btn-pill:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

/* ACTIVE: press */
.volunteer-prompt .btn-pill:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Keyboard focus (accessibility) */
.volunteer-prompt .btn-pill:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

/* ===========================================
   MOBILE
=========================================== */
/* Smooth + prevent iOS transition weirdness */
.volunteer-prompt {
  transition: opacity 0.35s ease, transform 0.35s ease;
  will-change: opacity, transform;
}

/* MOBILE layout (all devices) */
@media (max-width: 768px) {
  /* Apply to BOTH base + active so it doesn't shift when .active is toggled */
  .volunteer-prompt,
  .volunteer-prompt.active {
    left: 1rem !important;
    right: 1rem !important;

    width: auto;
    max-width: 420px;
    margin: 0 auto;

    /* remove desktop translateX */
    transform: translateY(0) !important;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .prompt-text {
    white-space: normal;
    text-align: center;
  }

  .prompt-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
  }

  .volunteer-prompt .btn-pill {
    width: 100%;
  }
}

/* Safe-area spacing (helps iPhone home indicator) */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .volunteer-prompt,
    .volunteer-prompt.active {
      bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 0.75rem));
    }
  }
}

/* ✅ DISABLE ON iOS (hide prompt completely) */
@supports (-webkit-touch-callout: none) {
  .volunteer-prompt {
    display: none !important;
  }
}
