/**
 * WP Telegram Clinic Assistant — Frontend Floating Button
 */

.wptca-float-btn {
    position: fixed;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wptca-btn-color, #229ED9);
    color: #fff !important;
    width: var(--wptca-btn-size, 60px);
    height: var(--wptca-btn-size, 60px);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    overflow: hidden;
}

.wptca-float-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    color: #fff !important;
}

.wptca-float-btn:visited,
.wptca-float-btn:active,
.wptca-float-btn:focus {
    color: #fff !important;
    text-decoration: none !important;
    outline: none;
}

/* Positions */
.wptca-pos-bottom-right {
    bottom: 24px;
    right: 24px;
}

.wptca-pos-bottom-left {
    bottom: 24px;
    left: 24px;
}

.wptca-pos-top-right {
    top: 24px;
    right: 24px;
}

.wptca-pos-top-left {
    top: 24px;
    left: 24px;
}

/* Icon */
.wptca-float-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    height: 50%;
}

.wptca-float-icon svg {
    width: 100%;
    height: 100%;
}

/* Pulse animation */
.wptca-float-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    opacity: 0.6;
    z-index: -1;
    animation: wptca-pulse 2.4s ease-out infinite;
}

@keyframes wptca-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Text label (shown on hover for compact positions) */
.wptca-float-text {
    display: none;
    margin-inline-start: 8px;
    margin-inline-end: 12px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wptca-float-btn:hover .wptca-float-text {
    display: inline;
}

/* When text is always shown, expand the button */
.wptca-float-btn.wptca-show-text {
    width: auto;
    min-width: var(--wptca-btn-size, 60px);
    padding: 0 20px;
    border-radius: 30px;
}

.wptca-float-btn.wptca-show-text .wptca-float-text {
    display: inline;
}

.wptca-float-btn.wptca-show-text .wptca-float-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .wptca-pos-bottom-right,
    .wptca-pos-bottom-left {
        bottom: 16px;
    }
    .wptca-pos-bottom-right {
        right: 16px;
    }
    .wptca-pos-bottom-left {
        left: 16px;
    }
    .wptca-float-btn {
        width: 52px !important;
        height: 52px !important;
    }
    .wptca-float-btn.wptca-show-text {
        padding: 0 16px;
    }
    .wptca-float-btn.wptca-show-text .wptca-float-text {
        font-size: 13px;
    }
}
