:root {
    --fb-blue: #023436;
    --fb-light-blue: #e1f5f6;
    --fb-dark-blue: #011b1c;
    --fb-gray: #f0f5f5;
    --fb-dark-gray: #5a6d6e;
    --fb-green: #03b5aa;
}

.fb-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 400px;
    z-index: 1000;
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    animation: chatFadeInUp 0.3s ease-out forwards;
}


/* Header */
.fb-chat-header {
    background: linear-gradient(-45deg, #00F1B5, #D9FF43);
    color: #000;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
}

.fb-chat-header:hover {
    background-color: var(--fb-dark-blue);
}

.fb-chat-header .title {
    font-weight: 600;
    font-size: 16px;
}

.fb-chat-header .controls {
    display: flex;
    gap: 15px;
}

.fb-chat-header .controls i {
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.fb-chat-header .controls i:hover {
    transform: scale(1.2);
}

/* Chat body */
.fb-chat-body {
    background-color: white;
    height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 0.3s ease;
}

.fb-chat-body.collapsed {
    height: 0;
}

/* Messages container */
.fb-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: var(--fb-gray);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Message bubbles */
.fb-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 18px;
    animation: fadeIn 0.2s ease-out;
    position: relative;
    word-wrap: break-word;
}

.fb-message.received {
    align-self: flex-start;
    background-color: white;
    border-top-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #000000;
}

.fb-message.sent {
    align-self: flex-end;
    background-color: var(--fb-blue);
    color: white;
    border-top-right-radius: 5px;
}

/* Typing indicator */
.fb-typing {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: white;
    border-radius: 18px;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease-out;
}

.fb-typing .dot {
    width: 8px;
    height: 8px;
    background-color: var(--fb-dark-gray);
    border-radius: 50%;
    margin: 0 2px;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

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

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

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

/* Input area */
.fb-chat-input {
    display: flex;
    padding: 10px;
    background-color: white;
    border-top: 1px solid #ddd;
    align-items: center;
}

.fb-chat-input input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: var(--fb-gray);
    outline: none;
    transition: background-color 0.2s;
}

.fb-chat-input input:focus {
    background-color: #e4e6eb;
}

.fb-chat-input button {
    background: none;
    border: none;
    color: var(--fb-blue);
    font-size: 20px;
    margin-left: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.fb-chat-input button:hover {
    transform: scale(1.1);
}

/* Minimized state */
.fb-chat-widget.minimized {
    width: 200px;
}

.fb-chat-widget.minimized .fb-chat-body {
    display: none;
}

/* Animations */
@keyframes chatFadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes typingAnimation {

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

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

/* Message animations */
.fb-message.sent {
    animation: messageSent 0.3s ease-out;
}

.fb-message.received {
    animation: messageReceived 0.3s ease-out;
}

@keyframes messageSent {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

@keyframes messageReceived {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

/* Online status */
.online-status {
    font-size: 12px;
    color: var(--fb-dark-gray);
    margin-bottom: 10px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.online-status .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--fb-green);
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.fb-login-form {
    animation: fadeIn 0.3s ease-out;
}

.fs-14 {
    font-size: 14px;
}

.fb-chat-body .form-control::placeholder {
    color: #222222;
    font-style: italic;
}

.fb-chat-body .userProfileSubmitBtn:hover {
    border: 1px solid #000;
    color: #000;
}

/* Waiting Queue Container */
.fb-waiting-queue {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

/* Header */
.queue-header {
    color: #023436;
    font-weight: 500;
    text-align: center;
    margin-bottom: 12px;
}

/* Queue Info Container */
.queue-info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.queue-position-badge {
    background-color: #e1f5f6;
    color: #023436;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.queue-text-container {
    flex: 1;
    margin-left: 15px;
}

.queue-position-text {
    font-weight: 500;
}

.queue-time-estimate {
    font-size: 0.8rem;
    color: #5a6d6e;
}

/* Progress Bar */
.queue-progress-container {
    height: 8px;
    border-radius: 4px;
    background-color: #f0f5f5;
}

.queue-progress-bar {
    height: 100%;
    border-radius: 4px;
    background-color: #03b5aa;
    transition: width 0.5s ease;
}

/* Status Indicator */
.queue-status-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.typing-indicator {
    margin-right: 8px;
}

.typing-dot {
    background-color: #03b5aa;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.queue-status-text {
    font-size: 0.8rem;
    color: #5a6d6e;
}

/* Animations */
@keyframes typingAnimation {

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Add this to your CSS */
.highlight {
    animation: highlight 0.5s ease-out;
    box-shadow: 0 0 0 2px rgba(0, 180, 170, 0.5);
}

@keyframes highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 180, 170, 0);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(0, 180, 170, 0.3);
    }

    100% {
        box-shadow: 0 0 0 2px rgba(0, 180, 170, 0.5);
    }
}