
/*
|--------------------------------------------------------------------------
| Chat Container
|--------------------------------------------------------------------------
*/
#chat-container {
    /* width: 420px; */
    height: 400px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
/*
|--------------------------------------------------------------------------
| Chat Messages Area
|--------------------------------------------------------------------------
*/
#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
/*
|--------------------------------------------------------------------------
| Common Message Style
|--------------------------------------------------------------------------
*/
.message {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 18px;
    line-height: 1.7;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff5f5 !important;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.error-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #dc2626;
    color: #fff;

    font-size: 14px;
    font-weight: bold;
}
.message.typing{
    white-space: unset;
}
/*
|--------------------------------------------------------------------------
| User Message
|--------------------------------------------------------------------------
*/
.user {
    align-self: flex-end;
    background: #5ba7ff;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}
/*
|--------------------------------------------------------------------------
| Bot Message
|--------------------------------------------------------------------------
*/
.bot {
    align-self: flex-start;
    background: #efefef;
    color: #111111;
    border-bottom-left-radius: 6px;
}
/*
|--------------------------------------------------------------------------
| Input Area
|--------------------------------------------------------------------------
*/
#chat-input-area {
    padding: 14px;
    border-top: 1px solid #e5e5e5;
    background: #ffffff;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
/*
|--------------------------------------------------------------------------
| Multiline Chat Input
|--------------------------------------------------------------------------
*/
#user-input {
    flex: 1;
    min-height: 24px;
    max-height: 140px;
    resize: none;
    border: 1px solid #dcdcdc;
    border-radius: 22px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    outline: none;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    transition: border 0.2s ease;
}
#user-input:focus {
    border-color: #5ba7ff;
}
/*
|--------------------------------------------------------------------------
| Send Button
|--------------------------------------------------------------------------
*/
#send-btn {
    border: none;
    /* background: background-color: var(--brand-subtler); */
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
    opacity: .5;
}
#send-btn:hover {
    
}
.submit-btn-svg{
    margin: 0 auto;
    height: 24px;
    width: 30px;
}
/*
|--------------------------------------------------------------------------
| Scrollbar
|--------------------------------------------------------------------------
*/
#chat-box::-webkit-scrollbar {
    width: 6px;
}
#chat-box::-webkit-scrollbar-thumb {
    background: #d2d2d2;
    border-radius: 10px;
}
/*
|--------------------------------------------------------------------------
| Chat Header
|--------------------------------------------------------------------------
*/
#chat-header {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.02) 0.44%, rgba(0, 0, 0, 0) 49.5%),#ffffff;
    color: white;
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
}
/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/
#chat-header {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.02) 0.44%, rgba(0, 0, 0, 0) 49.5%),#ffffff;
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    position: relative;
}
#chat-title {
    font-size: 14px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-avatar-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
/*
|--------------------------------------------------------------------------
| Menu
|--------------------------------------------------------------------------
*/
#menu-container {
    position: relative;
}
#menu-btn {
    background: transparent;
    border: none;
    color: gray;
    font-size: 22px;
    cursor: pointer;
}
#menu-dropdown {
    display: none;
    position: absolute;
    top: 35px;
    right: 0;
    width: 180px;
    background: white;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 9999;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    color: #333;
    transition: background 0.2s ease;
}
.menu-item:hover {
    background: #f5f5f5;
}
#menu-dropdown.show {
    display: block;
}
.bot a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
    word-break: break-word;
}
.bot a:hover {
    color: #004999;
}
.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    color: #666;
}
.menu-icon svg {
    display: block;
}
#menu-dropdown {
    width: 220px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
/*
|--------------------------------------------------------------------------
| End Chat Modal
|--------------------------------------------------------------------------
*/
#end-chat-modal {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}
#end-chat-modal.show {
    display: flex !important;
}
#end-chat-content {
    width: 40%;
    text-align: center;
}
#end-chat-icon {
    font-size: 25px;
    color: #888;
}
#end-chat-title {
    font-size: 28px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}
#end-chat-message {
    color: #888;
    font-size: 16px;
    margin-bottom: 10px;
}
#confirm-end-chat,
#cancel-end-chat {
    width: 70%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
}
#confirm-end-chat:hover,
#cancel-end-chat:hover {
    background: #f5f5f5;
}
.size-4 {
    width: calc(var(--spacing) * 4);
    height: calc(var(--spacing) * 4);
}
svg {
    vertical-align: middle;
    display: block;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}
.user-wrapper {
    align-items: flex-end;
}
.bot-wrapper {
    align-items: flex-start;
}
.message-time {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    padding: 0 8px;
}
#inactive-chat-modal{
    position: absolute; /* relative to chat container */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.35);
    z-index: 9999;
}
#inactive-chat-modal.show{
    display:flex !important;
}
.inactive-chat-content{
    width: 320px;
    max-width: 90%;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}
.inactive-chat-content button{
    margin-top:15px;
    padding:10px 18px;
    border:none;
    background:#2563eb;
    color:#fff;
    border-radius:8px;
    cursor:pointer;
}
/* Default state */
#send-btn {
    background: #d1d5db;
    color: #fff;
    border: none;
    transition: all 0.2s ease;
}

/* Active state */
#send-btn.active {
    background: #000;
    color: #fff;
}

/* Disabled look */
#send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #666;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}
#chat-footer-text{
    text-align:center;
    font-size:12px;
    color:#777;
    padding:8px 10px 10px;
    border-top:1px solid #f1f1f1;
    background:#fff;
    line-height:1.4;
}
#chat-input-area{
    display:flex;
    align-items:flex-end;
    gap:8px;
}

#dictate-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:#f3f4f6;
    cursor:pointer;
    font-size:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

#dictate-btn:hover{
    background:#e5e7eb;
}

#dictate-btn.recording{
    background:#ef4444;
    color:#fff;
}

#dictate-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:#f3f4f6;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

#dictate-btn.recording{
    background:#ef4444;
    color:#fff;
}

.mic-pulse{
    width:12px;
    height:12px;
    border-radius:50%;
    background:#fff;
    animation:pulseMic 1s infinite;
}

@keyframes pulseMic{

    0%{
        transform:scale(1);
        opacity:1;
    }

    50%{
        transform:scale(1.5);
        opacity:.5;
    }

    100%{
        transform:scale(1);
        opacity:1;
    }
}
@keyframes typingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .4;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}
@media only screen and (max-width: 768px) and (orientation: portrait) {
  /* Your styles here */
  #chat-container{
    height: 500px;
  }
  .message {
    font-size: 18px;
  }
}
/*
#chat-container {
    height: 500px;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    font-family: Arial;
}
#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.6;
    white-space: normal;
    word-wrap: break-word;
}
.user {
    text-align: right;
    color: blue;
}
.bot {
    text-align: left;
    color: green;
    white-space: pre-wrap;
    line-height: 1.7;
    word-break: break-word;
}
#chat-input-area {
    display: flex;
}
#user-input {
    flex: 1;
    padding: 10px;
}
button {
    padding: 10px;
}
.bot strong {
    font-weight: bold;
}
.bot em {
    font-style: italic;
}
.bot br {
    line-height: 1.8;
}*/