/* ==========================================================================
   CSS Variables & Typography
   ========================================================================== */
   :root {
    /* Color Palette */
    --clr-background: #FAF9F6; /* Soft White */
    --clr-section-alt: #F3EFE9; /* Warm Beige */
    --clr-primary: #DDBEA9; /* Nude Rose */
    --clr-primary-dark: #CB997E; /* Deep Nude */
    --clr-text-main: #2D2A26; /* Deep Charcoal */
    --clr-text-muted: #6B655F; /* Muted Taupe */
    --clr-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Layout & spacing */
    --max-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Effects */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-soft: 0 10px 40px rgba(45, 42, 38, 0.05);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text-main);
    background-color: var(--clr-background);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

h1 i {
    font-weight: 400;
    font-style: italic;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Utilities & Layout
   ========================================================================== */
.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.section-bg {
    background-color: var(--clr-section-alt);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--clr-text-main);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: var(--clr-white);
}

.btn-primary:hover {
    background-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary-dark);
}

.btn-secondary:hover {
    background-color: var(--clr-white);
    transform: translateY(-2px);
}

.btn-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--clr-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    position: relative;
    padding-bottom: 2px;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--clr-primary-dark);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.btn-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
    padding: var(--spacing-sm) 0;
    background: transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 0.5rem 0;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-list a {
    font-size: 0.95rem;
    color: var(--clr-text-main);
}

.nav-list a:hover {
    color: var(--clr-primary-dark);
}

.nav-cta {
    background-color: var(--clr-primary);
    color: var(--clr-white) !important;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-cta:hover {
    background-color: var(--clr-primary-dark);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--clr-text-main);
    transition: var(--transition-smooth);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 var(--spacing-md);
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: -1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    max-width: 600px;
    margin-left: max(2rem, calc((100% - var(--max-width)) / 2));
    background: rgba(255, 255, 255, 0.6);
    padding: 3rem;
    backdrop-filter: blur(15px);
}

.eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--clr-primary-dark);
    display: block;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    max-width: 450px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--clr-text-muted);
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--clr-text-main);
    font-weight: 500;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.color-corrected-portrait {
    /* Filtro para armonizar la colorimetría: ligeramente más cálido, saturado y contrastado para encajar con los tonos nude */
    filter: sepia(0.25) contrast(1.05) saturate(1.15) brightness(1.05);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background-color: var(--clr-white);
    padding: 1.5rem;
    font-family: var(--font-heading);
    color: var(--clr-primary-dark);
    font-size: 1.2rem;
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

.services-header p {
    color: var(--clr-text-muted);
}

.service-category {
    margin-bottom: 4rem;
    padding: 3rem;
    background: var(--clr-white);
    box-shadow: var(--shadow-soft);
    border-top: 3px solid var(--clr-primary);
}

.category-title {
    font-size: 2.2rem;
    color: var(--clr-text-main);
    margin-bottom: 0.5rem;
}

.category-subtitle {
    font-family: var(--font-heading);
    color: var(--clr-primary-dark);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-style: italic;
    border-bottom: 1px solid rgba(221, 190, 169, 0.3);
    padding-bottom: 1.5rem;
}

.treatment-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .treatment-list {
        grid-template-columns: 1fr 1fr;
    }
}

.treatment-list li {
    padding: 1.2rem;
    background: var(--clr-background);
    border-left: 2px solid var(--clr-primary);
    transition: var(--transition-smooth);
}

.treatment-list li:hover {
    transform: translateX(5px);
    background: var(--clr-section-alt);
}

.treatment-list li span {
    display: block;
    font-weight: 500;
    color: var(--clr-text-main);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.treatment-list li p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.treatment-list li.has-gallery {
    padding-bottom: 1.5rem;
}

.mini-gallery {
    margin-top: 1rem;
    margin-bottom: 0;
}

.mini-gallery .ba-image img {
    aspect-ratio: 1 / 1;
}

.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 1rem 2.5rem;
    background-color: transparent;
    color: var(--clr-text-main);
    border: 1px solid var(--clr-text-main);
    text-decoration: none;
    font-weight: 500;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.btn-instagram:hover {
    transform: translateY(-3px);
    background-color: var(--clr-primary);
    border-color: var(--clr-primary);
    color: var(--clr-white);
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   Exclusive Protocols Section
   ========================================================================== */
.protocols {
    background: linear-gradient(135deg, var(--clr-primary) 0%, #D2AF99 100%);
    color: var(--clr-text-main);
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.protocols .section-title {
    color: var(--clr-text-main);
}

.protocols .services-header p {
    color: var(--clr-text-muted);
}

.protocols-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .protocols-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.protocol-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
    padding: 3rem 2.5rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.protocol-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-5px);
    border-color: var(--clr-primary);
}

.protocol-card h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--clr-primary-dark);
    font-style: italic;
    font-weight: 400;
}

.protocol-card p {
    color: var(--clr-text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    flex-grow: 1;
}

.protocol-card strong {
    color: var(--clr-text-main);
    font-weight: 500;
}

.ba-gallery {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ba-image {
    position: relative;
    flex: 1;
}

.ba-image img {
    border-radius: 4px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.ba-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--clr-text-main);
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.protocol-card .btn-link {
    color: var(--clr-primary);
    align-self: flex-start;
}

.protocol-card .btn-link::after {
    background-color: var(--clr-primary);
}

/* ==========================================================================
   Results & Philosophy Section
   ========================================================================== */
.philosophy-container {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.philosophy-image img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.quote {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.3;
    color: var(--clr-primary-dark);
    margin-bottom: 1rem;
}

.quote-author {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 3rem;
}

.social-proof {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--clr-primary);
}

.proof-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--clr-text-main);
    line-height: 1;
}

.proof-text {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    max-width: 250px;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.instagram-link:hover {
    color: var(--clr-primary-dark);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--clr-white);
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.btn-large {
    background-color: var(--clr-white);
    color: var(--clr-primary-dark);
    padding: 1.2rem 3rem;
    font-size: 1rem;
}

.btn-large:hover {
    background-color: var(--clr-background);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-text-main);
    color: var(--clr-white);
    padding: var(--spacing-lg) 0 2rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.footer-brand .logo {
    color: var(--clr-white);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--clr-white);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

/* ==========================================================================
   Booking Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 42, 38, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--clr-white);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 3rem 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: translateY(20px);
    transition: transform 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-step h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--clr-text-main);
}

.modal-step p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(203, 153, 126, 0.3);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: rgba(221, 190, 169, 0.05); /* very light nude */
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--clr-primary);
}

.modal-btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
    cursor: pointer;
    line-height: 1.3;
}

.checkbox-container input {
    margin-top: 3px;
}

.error-msg {
    color: #e63946 !important;
    font-size: 0.85rem !important;
    margin-top: -0.5rem;
    margin-bottom: 1rem !important;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 80px;
    }

    .hero-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
    }

    .hero-content {
        margin: 0;
        background: transparent;
        padding: 0;
        backdrop-filter: none;
    }

    .hero-actions {
        justify-content: center;
    }
    
    .about-container, .philosophy-container {
        grid-template-columns: 1fr;
    }
    
    .philosophy-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--clr-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        box-shadow: var(--shadow-soft);
        clip-path: circle(0% at top right);
        transition: clip-path 0.5s ease-in-out;
    }
    
    .nav-list.active {
        clip-path: circle(150% at top right);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Botpress Custom Implementation
   ========================================================================== */
.floating-botpress {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 20px rgba(188, 143, 143, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: floating-bounce 2s infinite ease-in-out;
}

.floating-botpress:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(188, 143, 143, 0.6);
}

@keyframes floating-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.botpress-frame-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 140px);
    background-color: var(--clr-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    overflow: hidden;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(188, 143, 143, 0.2);
}

.botpress-frame-container.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.botpress-header {
    background-color: var(--clr-primary);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.botpress-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s;
}

.botpress-close:hover {
    opacity: 0.7;
}

.botpress-frame-container iframe {
    width: 100%;
    flex: 1;
    border: none;
}

/* ==========================================================================
   Chat Widget IA
   ========================================================================== */
.chat-widget-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--clr-primary-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(203, 153, 126, 0.5);
    transition: var(--transition-smooth);
    z-index: 999;
}

.chat-widget-btn:hover {
    background: var(--clr-text-main);
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(45, 42, 38, 0.3);
}

.chat-widget-btn svg {
    width: 28px;
    height: 28px;
}

.chat-widget-panel {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 360px;
    height: 520px;
    background: var(--clr-background);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(45, 42, 38, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 998;
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: bottom right;
}

.chat-widget-panel.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-panel-header {
    background: var(--clr-text-main);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chat-panel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    color: white;
    font-size: 0.85rem;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.chat-panel-info {
    flex: 1;
}

.chat-panel-info strong {
    display: block;
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
}

.chat-panel-info span {
    color: var(--clr-primary);
    font-size: 0.75rem;
    font-family: var(--font-body);
}

.chat-panel-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.chat-panel-close:hover {
    color: white;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--clr-primary);
    border-radius: 4px;
}

.chat-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-bubble.bot {
    background: var(--clr-section-alt);
    color: var(--clr-text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.user {
    background: var(--clr-primary-dark);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.typing {
    background: var(--clr-section-alt);
    align-self: flex-start;
    padding: 12px 16px;
}

.typing-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--clr-primary-dark);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.chat-calendar-btn {
    display: inline-block;
    margin-top: 10px;
    background: var(--clr-primary-dark);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    align-self: flex-start;
}

.chat-calendar-btn:hover {
    background: var(--clr-text-main);
}

.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--clr-section-alt);
    display: flex;
    gap: 8px;
    background: white;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    border: 1.5px solid var(--clr-section-alt);
    border-radius: 25px;
    padding: 9px 16px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--clr-text-main);
    background: var(--clr-background);
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--clr-primary-dark);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--clr-primary-dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: var(--clr-text-main);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

@media (max-width: 480px) {
    .chat-widget-panel {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 90px;
    }
}

@media (max-width: 480px) {
    .botpress-frame-container {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 100px;
    }
}
