* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;

    background: #f5f5f5;

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    color: #222;
}


.bot-container {

    width: 100%;
    max-width: 920px;

    height: 90vh;
    min-height: 600px;

    margin: 30px auto;

    background: #fff;

    border-radius: 25px;

    overflow: hidden;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08);

    display: flex;
    flex-direction: column;
}


/* الهيدر */

.bot-header {

    background:
        linear-gradient(
            135deg,
            #d4ae4e,
            #e9c566
        );

    padding: 25px 30px;

    display: flex;

    align-items: center;

    gap: 20px;
}


.bot-icon {

    width: 60px;
    height: 60px;

    background: rgba(255,255,255,0.7);

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 32px;
}


.bot-header h1 {

    margin: 0 0 7px;

    font-size: 25px;

    color: #111;
}


.bot-header p {

    margin: 0;

    font-size: 14px;

    color: #4d3d18;
}


/* منطقة المحادثة */

.chat-area {

    flex: 1;

    overflow-y: auto;

    padding: 30px;

    background: #fff;
}


/* الرسائل */

.message {

    display: flex;

    gap: 12px;

    margin-bottom: 20px;

    animation:
        messageAppear
        0.25s
        ease;
}


@keyframes messageAppear {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.message-icon {

    width: 42px;
    height: 42px;

    min-width: 42px;

    border-radius: 12px;

    background: #f3f3f3;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 21px;
}


.message-content {

    max-width: 80%;

    padding: 15px 20px;

    border-radius: 18px;

    line-height: 1.8;

    font-size: 15px;
}


/* رسالة البوت */

.bot-message {

    justify-content: flex-start;
}


.bot-message .message-content {

    background: #f5f5f5;

    border: 1px solid #e6e6e6;
}


/* رسالة المستخدم */

.user-message {

    justify-content: flex-start;

    direction: rtl;
}


.user-message .message-content {

    background: #dcb653;

    color: #111;

    margin-right: auto;

    border-radius: 18px 18px 5px 18px;
}


.message-content p {

    margin: 8px 0;
}


.message-content ul {

    margin-top: 8px;

    padding-right: 22px;
}


.message-content li {

    margin: 4px 0;
}


.welcome-hint {

    font-weight: bold;
}


/* المرجع */

.bot-reference {

    color: #80651f;

    font-size: 13px;
}


/* منطقة الإدخال */

.input-area {

    padding: 18px;

    border-top:
        1px solid #e8e8e8;

    background: #fff;
}


#chatForm {

    display: flex;

    gap: 10px;
}


#message {

    flex: 1;

    height: 55px;

    border:
        2px solid #dcb653;

    border-radius: 30px;

    padding:
        0 22px;

    font-size: 15px;

    font-family: inherit;

    outline: none;
}


#message:focus {

    border-color: #bd9634;

    box-shadow:
        0 0 0 3px
        rgba(220, 182, 83, 0.12);
}


#sendButton {

    width: 120px;

    border: 0;

    border-radius: 30px;

    background: #dcb653;

    color: #111;

    font-size: 16px;

    font-family: inherit;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}


#sendButton:hover {

    background: #cda847;
}


#sendButton:disabled {

    opacity: 0.6;

    cursor: not-allowed;
}


/* جاري البحث */

.loading-message {

    opacity: 0.8;
}


.loading-dots {

    animation:
        blink 1s
        infinite;
}


@keyframes blink {

    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}


/* الهاتف */

@media (max-width: 700px) {

    body {
        background: #fff;
    }


    .bot-container {

        width: 100%;

        height: 100vh;
        min-height: 100vh;

        margin: 0;

        border-radius: 0;

        box-shadow: none;
    }


    .bot-header {

        padding: 18px;

        gap: 12px;
    }


    .bot-icon {

        width: 48px;
        height: 48px;

        min-width: 48px;

        font-size: 25px;
    }


    .bot-header h1 {

        font-size: 20px;
    }


    .bot-header p {

        font-size: 12px;
    }


    .chat-area {

        padding: 18px 12px;
    }


    .message-content {

        max-width: 88%;

        font-size: 14px;

        padding: 12px 15px;
    }


    .input-area {

        padding: 10px;
    }


    #message {

        height: 48px;

        padding: 0 15px;

        font-size: 14px;
    }


    #sendButton {

        width: 80px;

        font-size: 14px;
    }
}