/* FlexZone Gym - Custom Styles */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Alert Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-slide:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

/* Prevent animation from playing on hidden elements */
.hidden.alert-slide,
.alert-slide.hidden {
    animation: none !important;
    display: none !important;
}

/* QR Scanner Overlay */
.qr-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Hero Carousel Styles */
.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
}

.carousel-dot.active {
    background-color: rgba(255, 255, 255, 1) !important;
    width: 12px;
    height: 12px;
}

.carousel-prev,
.carousel-next {
    backdrop-filter: blur(4px);
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(255, 255, 255, 0.4) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading state */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Chat Widget Animations */
@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chatPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

#chat-widget {
    animation: chatSlideUp 0.3s ease-out;
}

#chat-toggle:hover {
    animation: chatPulse 1s ease-in-out infinite;
}

#chat-window {
    animation: chatSlideUp 0.3s ease-out;
}

/* Chat Widget Responsive */
@media (max-width: 640px) {
    #chat-widget {
        bottom: 1rem;
        right: 1rem;
        z-index: 9999;
    }
    
    #chat-window {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        margin: 0 !important;
    }
    
    #chat-toggle {
        width: 3.5rem;
        height: 3.5rem;
        z-index: 10000;
    }
    
    #chat-toggle svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    #chat-messages {
        padding: 1rem;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .quick-reply-btn {
        min-height: 48px;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        width: 100%;
    }
    
    /* Header adjustments for mobile */
    #chat-window .bg-gradient-to-r {
        padding: 0.875rem 1rem;
        min-height: 60px;
    }
    
    /* Message bubbles adjustments */
    #chat-messages .bg-white {
        max-width: 90% !important;
        padding: 0.875rem !important;
    }
    
    /* Avatar adjustments */
    #chat-messages .w-10 {
        width: 2.25rem;
        height: 2.25rem;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    #chat-window {
        border-radius: 0 !important;
    }
    
    #chat-messages {
        padding: 0.75rem;
        max-height: calc(100vh - 110px);
    }
    
    .quick-reply-btn {
        min-height: 50px;
        padding: 0.875rem 1rem;
        font-size: 0.8125rem;
    }
    
    #chat-window .bg-gradient-to-r h3 {
        font-size: 0.9375rem;
    }
    
    #chat-window .bg-gradient-to-r p {
        font-size: 0.625rem;
    }
}

/* Chat Message Animation */
@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-messages > div {
    animation: messageSlide 0.3s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* Enhanced Chat Widget Styles */
#chat-window {
    backdrop-filter: blur(10px);
}

#chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #dc2626 #f3f4f6;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

.quick-reply-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    font-weight: 600;
}

.quick-reply-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.quick-reply-btn:hover::before {
    width: 300px;
    height: 300px;
}

.quick-reply-btn:active {
    transform: scale(0.99);
}

.quick-reply-btn:hover {
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.25);
}

/* Ensure all buttons have equal height */
.quick-replies {
    display: flex;
    flex-direction: column;
}

.quick-replies .quick-reply-btn {
    width: 100%;
    height: auto;
    min-height: 44px;
}

