/**
 * Floating Draggable "Book Appointment" Button Styles
 * Mobile and desktop friendly
 */

.floating-appointment-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    cursor: move;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

.floating-appointment-btn.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(44, 90, 44, 0.5) !important;
}

.floating-btn-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #2c5a2c 0%, #3d7a3d 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(44, 90, 44, 0.3);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.floating-btn-link:hover {
    background: linear-gradient(135deg, #3d7a3d 0%, #2c5a2c 100%);
    box-shadow: 0 6px 20px rgba(44, 90, 44, 0.4);
    transform: translateY(-2px);
    color: white;
}

.floating-btn-link:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 20px;
    line-height: 1;
}

.btn-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Drag hint */
.drag-hint {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 90, 44, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    animation: bounceHint 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.drag-hint::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(44, 90, 44, 0.95);
}

@keyframes bounceHint {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .floating-appointment-btn {
        bottom: 15px;
        right: 15px;
    }

    .floating-btn-link {
        padding: 10px 16px;
        gap: 0;
        font-size: 13px;
        min-width: auto;
        justify-content: center;
        align-items: center;
    }

    /* Hide icon on mobile */
    .btn-icon {
        display: none !important;
    }

    .btn-text {
        font-size: 13px;
        white-space: nowrap;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .drag-hint {
        top: -32px;
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Small mobile screens - compact button */
@media (max-width: 480px) {
    .floating-appointment-btn {
        bottom: 12px;
        right: 12px;
    }

    .floating-btn-link {
        padding: 8px 14px;
        gap: 0;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-text {
        font-size: 12px;
        line-height: 1.2;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    /* Icon already hidden by previous rule */
    .btn-icon {
        display: none !important;
    }
}

/* Accessibility - keyboard focus */
.floating-btn-link:focus {
    outline: 3px solid rgba(44, 90, 44, 0.5);
    outline-offset: 3px;
}

.floating-btn-link:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-appointment-btn,
    .floating-btn-link,
    .drag-hint {
        transition: none;
        animation: none;
    }
}

/* Print styles - hide button when printing */
@media print {
    .floating-appointment-btn {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floating-btn-link {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (if site implements dark mode) */
@media (prefers-color-scheme: dark) {
    .floating-btn-link {
        background: linear-gradient(135deg, #3d7a3d 0%, #4a8f4a 100%);
    }

    .floating-btn-link:hover {
        background: linear-gradient(135deg, #4a8f4a 0%, #3d7a3d 100%);
    }
}

/* Pulse animation on page load to attract attention */
.floating-appointment-btn {
    animation: pulseOnLoad 2s ease-in-out 1;
}

@keyframes pulseOnLoad {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(44, 90, 44, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(44, 90, 44, 0.6);
    }
}

/* Touch feedback for mobile */
.floating-btn-link:active {
    opacity: 0.9;
}
