.chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 550px;
    background-color: #111827;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Medium */
@media (max-width: 1024px) {
    .chat-container {
        width: 320px;
        height: 520px;
    }
}

/* Small */
@media (max-width: 768px) {
    .chat-container {
        width: 280px;
        height: 500px;
    }

    .bird-animation {
        width:100px !important;
        height:100px !important;
    }

    .chat-trigger {
        bottom: 20px !important;
        right: 35px !important;
    }
}

/* Extra Small */
@media (max-width: 480px) {
    .chat-container {
        width: 90%;
        bottom: 10px;
        right: 5%;
    }

    .bird-animation {
        width:70px !important;
        height:70px !important;
    }

    .chat-trigger {
        bottom: 20px !important;
        right: 20px !important;
    }
}


.wrapper {
    position: relative;
    width: 100px;
    height: 100px;
  }

  .bird-animation {
      width:130px;
      height:130px;
  }

.chat-header {
   background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    padding: 16px 20px;
    color: #fff;

    border-top-left-radius: 16px;
    border-top-right-radius: 16px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    color: white;
}


.chat-header-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-logo {
    width: 50px;
    height: 50px;

    background: #0f172a;

    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-logo i{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #fff;

}
.header-text {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    color: #ffffff !important;
}

.chat-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}
.chat-close-btn:hover {
    background: rgba(255,255,255,0.3);
}


.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #0f172a;
}

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

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

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #334155;  /* dark gray-blue */
    border-radius: 8px;
    border: 2px solid #0f172a;  /* matches background */
    transition: background-color 0.3s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background-color: #475569;  /* slightly lighter on hover */
}

/* Firefox support */
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}


.message {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.message-user {
    align-items: flex-end;
}

.message-admin {
    align-items: flex-start;
}

.message-content {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.6;
}

.message-user .message-content {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-bottom-right-radius: 6px;
}

.message-admin .message-content {
    background-color: #1e293b;
    color: #e2e8f0;
    border-bottom-left-radius: 6px;
}

.message-time {
    font-size: 0.7rem;
    padding: auto;
    margin-top: 5px;
    color: #94a3b8;
}

.chat-trigger {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 65px;
    height: 65px;

    /* background: linear-gradient(106deg, #601fd2 0%, #088177 5%, #404046 100%); */

    border-radius: 50%;
    background: linear-gradient(145deg, #1c75fa, #22029f); /* smooth diagonal gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.4);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

.chat-trigger:hover {
    box-shadow: 0 6px 20px rgba(28, 117, 250, 0.6); /* stronger glow */
    transform: scale(1.08);
}


.chat-trigger svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.chat-container.collapsed {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.attachment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.attachment-item {
    position: relative;
    width: 75px;
    height: 75px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8fafc;
}

.attachment-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.attachment-remove:hover {
    background: rgba(0, 0, 0, 0.7);
}

.attachment-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-icon {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #64748b;
}

.message-attachment {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-download {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background-color: #f1f5f9;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.attachment-download:hover {
    background-color: #e2e8f0;
}

.attachment-download i {
    margin-right: 6px;
}

/* Add typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 85px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: typing-dot 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 typing-dot {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

/* Add a welcome message with button */
.welcome-message {
    background-color: #fff;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.welcome-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.welcome-text {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.welcome-button {
    display: inline-block;
    background: #42c0ff;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.welcome-button:hover {
    background: #08a6f5;
    color: #ffffff !important;
}
.unread-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

.chat-image-preview {
    max-width: 200px;
    max-height: 150px;
    margin-top: 8px;
    border-radius: 6px;
    display: block;
}

.chat-input {
    padding: 16px;
    background-color: #111827;
    border-top: 1px solid #1e293b;
}


.input-wrapper {
    display: flex;
    align-items: center;
    background-color: #1e293b;
    border-radius: 12px;
    padding: 10px 12px;
    gap: 8px;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 15px;
    outline: none;
    padding: 6px 0;
}
.chat-actions {
    display: flex;
    gap: 12px;
}
.icon-button {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.icon-button:hover {
    color: #60a5fa;
}
