.floating-button {
    position: fixed;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center; /* Center content */
    gap: 0.8rem;
    z-index: 1000;
    width: 12vw; /* Viewport-width based */
    min-width: fit-content; /* Prevent content squeezing */
}

.floating-button .text {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.floating-button:hover {
    transform: translateY(-3px);
}

.floating-button .icon-container {
    display: flex;
    align-items: center;
    height: 20px;
}

.floating-button .icon-container svg {
    width: 30px;
    height: 20px;
}

/* Donate button specific styles */
.donate-button {
    composes: floating-button;
    bottom: 2rem;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.35);
}

.donate-button:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.45);
    background: linear-gradient(135deg, #ff8e8e, #ff6b6b);
}

.donate-button .lifeline {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 1.5s linear forwards infinite;
}

.quote-button {
    composes: floating-button;
    top: 2rem;
    background: linear-gradient(
        135deg,
        rgba(155, 77, 202, 0.9),
        rgba(188, 97, 243, 0.9)
    );
    box-shadow: 0 4px 15px rgba(155, 77, 202, 0.35);
    opacity: 0;
    pointer-events: none;
    border: none;
    cursor: pointer;
    transform: translateY(-20px); /* Start above final position */
}

.quote-button:hover {
    box-shadow: 0 6px 20px rgba(155, 77, 202, 0.45);
    background: linear-gradient(
        135deg,
        rgba(188, 97, 243, 0.9),
        rgba(155, 77, 202, 0.9)
    );
}

.quote-selection-active .quote-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@keyframes draw {
    to {
        stroke-dashoffset: -100;
    }
}

@media (max-width: 768px) {
    .floating-button {
        right: 1rem;
        padding: 0.6rem 1.2rem;
        width: 25vw; /* Wider percentage on smaller screens */
    }

    .floating-button .text {
        font-size: 0.8rem;
    }

    .floating-button .icon-container svg {
        width: 25px;
        height: 15px;
    }

    .donate-button {
        bottom: 1rem;
    }

    .quote-button {
        top: 1rem;
    }
}
