﻿/* Chat container */
.chat-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto 16px auto; /* align with cards spacing */
    padding: 0; /* cards inside control their own padding */
    background-color: transparent; /* use card styling instead */
    border-radius: 0;
    box-shadow: none;
}

/* Bubble for messages */
.message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 10px;
}

    /* Sent message (right) */
    .message.sent {
        background-color: black;
        color: white;
        margin-left: auto;
        text-align: right;
    }

    /* Received message (left) */
    .message.received {
        background-color: #e5e5ea;
        color: black;
        margin-right: auto;
    }

/* Message time styling */
.message-time-r {
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
}

.message-time-s {
    font-size: 0.75rem;
    color: white;
    margin-top: 5px;
}



@keyframes throb {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.unread-icon {
    color: #FFE000;
    font-weight: bold;
    margin-left: 5px;
    display: inline-block;
    animation: throb 1.2s infinite alternate ease-in-out;
}

.info-icon {
    cursor: pointer;
    margin-left: 5px;
    color: #007bff;
    font-size: 18px;
}

.custom-tooltip {
    display: none;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 200px;
    z-index: 1000;
}

.participant-container {
    padding-left: 50px; /* Further reduced for smaller badge */
    display: flex;
    align-items: center; /* Vertically center text and badge */
}


.pin {
    position: absolute;
    top: 0;
    left: 0;
    color: #FFE000; /* Makes the pin yello */
    font-size: 16px; /* Adjust size as needed */
    transform: rotate(330deg); /* Tilts the pin */
    animation: pulse 1.5s infinite alternate ease-in-out;
    text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
}

/* Status badge positioned to top left of accordion header */
.status-badge-top-left {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%); /* Vertically center with text */
    z-index: 10;
    font-size: 0.6em; /* Even smaller font size */
    font-weight: 500;
    min-width: 40px; /* Smaller badge width */
    text-align: center;
    padding: 0.10em 0.3em;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure accordion header has relative positioning for absolute badge positioning */
.accordion-header {
    position: relative;
}

/* Adjust participant container padding when badge is present */
.participant-container-with-badge {
    padding-left: 80px; /* Increased padding to make room for badge */
    padding-top: 8px; /* Add some top padding */
}

@keyframes pulse {
    0% {
        transform: rotate(330deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(330deg) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: rotate(330deg) scale(1);
        opacity: 1;
    }
}

/* Inline message input styling */
.message-input {
    resize: vertical;
    min-height: 60px;
    border-radius: 8px;
}

.send-message-btn {
    border-radius: 8px;
    white-space: nowrap;
    padding: 12px 20px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px !important;
    margin-right: 0;
}

/* Override Bootstrap input-group to add gap between input and button */
[data-thread-input] .input-group {
    gap: 12px;
}

[data-thread-input] .input-group > * {
    margin: 0;
}

.send-message-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

[data-thread-input] {
    border-top: 1px solid #e5e5ea;
    padding-top: 15px;
    margin-top: 15px;
}

/* Typing indicator styling - appears as a message bubble */
.typing-indicator {
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease-in;
}

.typing-indicator .message {
    /* Use the same styling as received messages */
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: #e5e5ea;
    color: black;
    margin-right: auto;
    margin-left: 0;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}

.typing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #666;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(0.8);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


