/* Chat Styles */
.chat-container {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100% - 60px);
}

.message {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    word-wrap: break-word;
    margin-bottom: 5px;
}

.message-time {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    text-align: right;
}

.message-user {
    align-self: flex-end;
    background-color: var(--message-user);
    border-bottom-right-radius: 4px;
    color: black;
}

.message-bot {
    align-self: flex-start;
    background-color: var(--message-bot);
    border-bottom-left-radius: 4px;
    color: black;
}

.typing-indicator {
    display: flex;
    align-self: flex-start;
    background-color: var(--message-bot);
    padding: 12px 15px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    margin-bottom: 10px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    margin: 0 2px;
    opacity: 0.6;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-5px);
    }
}

/* Scroll to Bottom Button */
.scroll-to-bottom-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(98, 0, 234, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transition: all 0.2s ease;
    opacity: 0.9;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(98, 0, 234, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(98, 0, 234, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(98, 0, 234, 0);
    }
}

.scroll-to-bottom-button:hover {
    transform: scale(1.1);
    opacity: 1;
    background: rgba(98, 0, 234, 1);
}

.scroll-to-bottom-button i {
    font-size: 24px;
}

.flow-column.journey-column .scroll-to-bottom-button {
    position: sticky;
    bottom: 20px;
    float: right;
    margin-top: -70px;
    margin-right: 20px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .main-container {
        gap: 20px;
    }

    .flow-container {
        max-width: 500px;
    }
}

@media (max-width: 1000px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }

    .flow-container {
        width: 100%;
        max-width: 650px;
        margin-bottom: 30px;
        flex: 0 0 auto;
        height: 600px;
    }

    .phone-outer {
        width: 360px;
        height: 800px;
        flex: 0 0 360px;
        transform: scale(0.9);
    }
}

@media (max-width: 700px) {
    .flow-columns-container {
        flex-direction: column;
        height: 100%;
    }

    .flow-column.active-flow-column {
        max-width: 100%;
        height: 40%;
    }

    .flow-column.journey-column {
        height: 60%;
    }

    .phone-outer {
        width: 320px;
        height: 700px;
        flex: 0 0 320px;
        transform: scale(0.85);
    }

    .event-node {
        max-width: 100%;
        word-wrap: break-word;
    }

    .event-card {
        max-width: 100%;
        word-wrap: break-word;
    }
}