/* =========================================================
   Emi AI Chatbot
   Eminencee Institute of Nursing
   ========================================================= */

#emi-chat-widget {
    font-family: Arial, Helvetica, sans-serif;
}


/* ---------------------------------------------------------
   Floating Chat Button
   --------------------------------------------------------- */

#emi-chat-button {
    position: fixed;
    right: 24px;
    bottom: 96px;

    width: 58px;
    height: 58px;

    border: none;
    border-radius: 50%;

    background: #176f89;
    color: #ffffff;

    font-size: 25px;
    cursor: pointer;

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

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);

    z-index: 999998;
}


/* ---------------------------------------------------------
   Chat Window
   --------------------------------------------------------- */

#emi-chat-window {
    position: fixed;

    right: 24px;
    bottom: 164px;

    width: 370px;
    height: 570px;

    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 190px);

    background: #ffffff;

    border-radius: 18px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);

    overflow: hidden;

    display: none;
    flex-direction: column;

    z-index: 999999;
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

#emi-chat-header {
    background: #176f89;
    color: #ffffff;

    padding: 14px 16px;

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

    flex-shrink: 0;
}


#emi-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}


#emi-ai-icon {
    width: 44px;
    height: 44px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.16);

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

    font-size: 23px;
}


#emi-chat-title {
    font-size: 20px;
    font-weight: 700;

    line-height: 1.15;
}


#emi-chat-subtitle {
    margin-top: 3px;

    font-size: 14px;

    line-height: 1.2;
}


#emi-chat-status {
    margin-top: 2px;

    font-size: 12px;

    opacity: 0.9;
}


#emi-close-button {
    border: none;
    background: transparent;

    color: #ffffff;

    font-size: 29px;
    line-height: 1;

    cursor: pointer;

    padding: 2px 4px;
}


/* ---------------------------------------------------------
   Messages
   --------------------------------------------------------- */

#emi-chat-messages {
    flex: 1;

    padding: 14px 14px 8px;

    overflow-y: auto;

    background: #ffffff;

    display: flex;
    flex-direction: column;

    gap: 10px;
}


.emi-message {
    max-width: 82%;

    padding: 12px 14px;

    border-radius: 15px;

    font-size: 16px;

    line-height: 1.45;

    white-space: pre-wrap;

    word-wrap: break-word;

    text-align: left;
}


.emi-bot-message {
    align-self: flex-start;

    background: #e9f2f5;

    color: #111111;

    border-top-left-radius: 5px;
}


.emi-user-message {
    align-self: flex-end;

    background: #176f89;

    color: #ffffff;

    border-top-right-radius: 5px;
}


/* ---------------------------------------------------------
   Quick Actions
   --------------------------------------------------------- */

#emi-quick-actions {
    padding: 6px 12px 10px;

    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    background: #ffffff;

    flex-shrink: 0;
}


#emi-quick-actions button {
    border: 1px solid #176f89;

    background: #ffffff;

    color: #176f89;

    border-radius: 18px;

    padding: 8px 14px;

    font-size: 14px;

    cursor: pointer;

    transition: background 0.15s ease, color 0.15s ease;
}


#emi-quick-actions button:hover {
    background: #176f89;
    color: #ffffff;
}


/* ---------------------------------------------------------
   Input Area
   --------------------------------------------------------- */

#emi-chat-input-area {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 10px 14px 14px;

    background: #ffffff;

    border-top: 1px solid #e4e7e9;

    flex-shrink: 0;
}


#emi-chat-input {
    flex: 1;

    min-width: 0;

    height: 48px;

    padding: 0 14px;

    border: 1px solid #d3dbe0;

    border-radius: 10px;

    font-size: 16px;

    outline: none;
}


#emi-chat-input:focus {
    border-color: #176f89;
}


#emi-send-button {
    height: 48px;

    padding: 0 17px;

    border: none;

    border-radius: 10px;

    background: #176f89;

    color: #ffffff;

    font-size: 16px;

    cursor: pointer;

    flex-shrink: 0;
}


#emi-send-button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 480px) {

    #emi-chat-window {
        top: 8px;
        right: 8px;
        bottom: 8px;
        left: 8px;

        width: auto;
        height: auto;

        max-width: none;
        max-height: none;

        border-radius: 16px;
    }


    #emi-chat-button {
        right: 16px;
        bottom: 88px;
    }


    #emi-chat-header {
        padding: 12px 14px;
    }


    #emi-chat-title {
        font-size: 19px;
    }


    #emi-chat-subtitle {
        font-size: 13px;
    }


    .emi-message {
        max-width: 86%;
        font-size: 16px;
    }


    #emi-quick-actions {
        gap: 7px;
        padding-left: 10px;
        padding-right: 10px;
    }


    #emi-quick-actions button {
        padding: 7px 12px;
        font-size: 14px;
    }


    #emi-chat-input-area {
        padding: 9px 10px 10px;
    }
}