/* ==========================================================================
   Clinic Floating Button Styles
   ========================================================================== */

.cfb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--cfb-padding-y) var(--cfb-padding-x);
    border: none;
    border-radius: var(--cfb-radius);
    font-family: inherit;
    font-size: var(--cfb-font-size);
    font-weight: var(--cfb-font-weight);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    z-index: 1;
}

.cfb-btn--floating {
    background: var(--cfb-bg);
    color: var(--cfb-text);
    box-shadow: var(--cfb-shadow);
}

.cfb-btn--floating:hover {
    background: var(--cfb-bg-hover);
    color: var(--cfb-text-hover);
    box-shadow: var(--cfb-shadow-hover);
    transform: scale(1.05) translateY(-2px);
}

.cfb-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cfb-btn__icon svg {
    width: 22px;
    height: 22px;
}

/* ==========================================================================
   Positioning
   ========================================================================== */

.cfb-floating {
    position: fixed;
    z-index: var(--cfb-z-index);
}

.cfb-floating--right {
    right: var(--cfb-offset-x);
    top: calc(50% + var(--cfb-offset-y));
    transform: translateY(-50%);
}

.cfb-floating--left {
    left: var(--cfb-offset-x);
    top: calc(50% + var(--cfb-offset-y));
    transform: translateY(-50%);
}

.cfb-floating--bottom-right {
    right: calc(20px + var(--cfb-offset-x));
    bottom: calc(20px + var(--cfb-offset-y));
}

.cfb-floating--bottom-left {
    left: calc(20px + var(--cfb-offset-x));
    bottom: calc(20px + var(--cfb-offset-y));
}

.cfb-floating--bottom-center {
    left: 50%;
    bottom: calc(20px + var(--cfb-offset-y));
    transform: translateX(-50%);
}

.cfb-floating--top-right {
    right: calc(20px + var(--cfb-offset-x));
    top: calc(20px + var(--cfb-offset-y));
}

.cfb-floating--top-left {
    left: calc(20px + var(--cfb-offset-x));
    top: calc(20px + var(--cfb-offset-y));
}

/* Vertical side positions */
.cfb-floating--right .cfb-btn--floating,
.cfb-floating--left .cfb-btn--floating {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 24px 14px;
    flex-direction: column;
    gap: 8px;
}

.cfb-floating--right .cfb-btn--floating {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cfb-floating--left .cfb-btn--floating {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.cfb-floating--right .cfb-btn__icon,
.cfb-floating--left .cfb-btn__icon {
    transform: rotate(-90deg);
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Pulse */
.cfb-btn--pulse {
    animation: cfb-pulse 2.5s ease-in-out infinite;
}

@keyframes cfb-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: var(--cfb-shadow);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px var(--cfb-primary);
    }
}

/* Heartbeat */
.cfb-btn--heartbeat {
    animation: cfb-heartbeat 1.5s ease-in-out infinite;
}

@keyframes cfb-heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.08);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.08);
    }

    70%,
    100% {
        transform: scale(1);
    }
}

/* Shake */
.cfb-btn--shake {
    animation: cfb-shake 5s ease-in-out infinite;
}

@keyframes cfb-shake {

    0%,
    90%,
    100% {
        transform: translateX(0);
    }

    92%,
    96% {
        transform: translateX(-5px);
    }

    94%,
    98% {
        transform: translateX(5px);
    }
}

/* ==========================================================================
   Mobile Panel
   ========================================================================== */

.cfb-mobile-panel {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    gap: 10px;
    justify-content: stretch;
}

.cfb-mobile-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 768px) {
    .cfb-desktop-only {
        display: none !important;
    }

    .cfb-mobile-panel {
        display: flex;
    }
}