/* Reset & Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f8f8f8;
    height: 100vh;
    overflow: hidden;
}

/* Floating Action Button (Chat Icon) */
.chat-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: #e60000;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Chat Container (Full Screen) */
.chat-container {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 90vh;
    background: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: bottom 0.4s ease;
    overflow: hidden;
}

.chat-container.open {
    bottom: 0;
}

/* Chat Header */
.chat-header {
    background: #e60000;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
}

.chat-header h2 {
    font-size: 18px;
    font-weight: 500;
}

/* Chat Box */
.chat-box {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fcfcfc;
}

/* Message Bubble */
.message {
    display: flex;
    align-items: start;
    gap: 10px;
    max-width: 85%;
}

.message.my-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    gap: 8px;
}

.message .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.message .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message .content {
    background: #f1f1f1;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 15px;
    color: #000;
    line-height: 1.4;
}

.my-message .content {
    background: #e60000;
    color: white;
}

.my-message .content::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-right-radius: 4px;
    border-bottom-left-radius: 4px;
    border-left-color: #e60000;
    position: absolute;
    left: -12px;
    bottom: 8px;
}

.other-message .content::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-right-color: #f1f1f1;
    position: absolute;
    right: -12px;
    bottom: 8px;
}

.message .content {
    position: relative;
}

/* Chat Input */
.chat-input {
    display: flex;
    padding: 12px 16px 20px;
    border-top: 1px solid #eee;
    background: white;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    outline: none;
    font-size: 15px;
}

.chat-input button {
    margin-left: 10px;
    padding: 0 20px;
    background: #e60000;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 500;
}

.chat-input button:hover {
    background: #cc0000;
}