/* Qualia Spa & Wellness - Frontend Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for category tabs */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Line clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth transitions for page elements */
main section {
    animation: fadeUp 0.4s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Material icons sizing fix */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Image loading placeholder */
[style*="background-image"] {
    background-color: #f1f1ef;
}

/* Touch feedback */
a:active,
button:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* Category tab active */
.category-tab.active {
    color: #87774f;
    border-bottom-color: #87774f;
}

/* Contact bubbles */
#contactBubbles {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
}

.contact-bubble {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px) scale(0.5);
}

#contactBubbles.show .contact-bubble {
    animation: bubbleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#contactBubbles.closing .contact-bubble {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: bubbleDown 0.2s ease-in forwards;
}

#contactBubbles.show .contact-bubble:nth-child(1) {
    animation-delay: 0s;
}

#contactBubbles.show .contact-bubble:nth-child(2) {
    animation-delay: 0.04s;
}

#contactBubbles.show .contact-bubble:nth-child(3) {
    animation-delay: 0.08s;
}

#contactBubbles.show .contact-bubble:nth-child(4) {
    animation-delay: 0.12s;
}

#contactBubbles.show .contact-bubble:nth-child(5) {
    animation-delay: 0.16s;
}

#contactBubbles.show .contact-bubble:nth-child(6) {
    animation-delay: 0.20s;
}

#contactBubbles.closing .contact-bubble:nth-child(6) {
    animation-delay: 0s;
}

#contactBubbles.closing .contact-bubble:nth-child(5) {
    animation-delay: 0.03s;
}

#contactBubbles.closing .contact-bubble:nth-child(4) {
    animation-delay: 0.06s;
}

#contactBubbles.closing .contact-bubble:nth-child(3) {
    animation-delay: 0.06s;
}

#contactBubbles.closing .contact-bubble:nth-child(2) {
    animation-delay: 0.09s;
}

#contactBubbles.closing .contact-bubble:nth-child(1) {
    animation-delay: 0.12s;
}

.contact-bubble:active {
    transform: scale(0.85) !important;
}

@keyframes bubbleUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bubbleDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(16px) scale(0.5);
    }
}