* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    height: 90vh;
    padding: 20px;
}

.chat-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    background-color: #000;
    /* Real estate green */
    color: white;
    position: relative;
}

.chat-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.chat-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.chat-header small {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
    margin-top: 5px;
}

/* Language toggle button */
.lang-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lang-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Tips button */
.tips-button {
    position: absolute;
    top: 20px;
    right: 90px;
    /* Position to the left of language toggle */
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tips-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

body.kurdish .tips-button {
    left: 90px;
    right: auto;
}

/* RTL support for Kurdish */
body.kurdish {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.kurdish .message.user {
    align-self: flex-start;
}

body.kurdish .message.bot {
    align-self: flex-end;
}

body.kurdish .lang-toggle {
    left: 20px;
    right: auto;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 10px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
    background-color: #000;
    /* Real estate green */
    color: white;
}

.message.bot {
    align-self: flex-start;
    background-color: #f0f2f5;
    color: #333;
}

/* Styling for formatted content in messages */
.message-content strong {
    font-weight: 600;
}

.message-content ol,
.message-content ul {
    padding-left: 25px;
    margin: 10px 0;
}

.message-content li {
    margin-bottom: 10px;
}

.message-content li:last-child {
    margin-bottom: 0;
}

/* RTL specific styles for lists */
body.kurdish .message-content ol,
body.kurdish .message-content ul {
    padding-right: 25px;
    padding-left: 0;
}

.message.typing .message-content {
    display: flex;
    align-items: center;
}

.message.typing .message-content::after {
    content: "...";
    animation: dots 1.5s infinite;
    width: 20px;
    text-align: left;
    display: inline-block;
}

@keyframes dots {

    0%,
    20% {
        content: ".";
    }

    40% {
        content: "..";
    }

    60%,
    100% {
        content: "...";
    }
}

.chat-input {
    display: flex;
    padding: 15px;
    background-color: #f5f7fb;
    border-top: 1px solid #e6e6e6;
}

#user-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 0.95rem;
}

#user-input:focus {
    border-color: #000;
    /* Real estate green */
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

#send-btn {
    margin-left: 10px;
    padding: 0 20px;
    background-color: #000;
    /* Real estate green */
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#send-btn:hover {
    background-color: #1b5e20;
    /* Darker real estate green */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}