/* Base styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90vh;
    font-size: 20px;
}

body.light-theme {
    background-color: #f4f4f4;
    color: black;
}

body.dark-theme {
    background-color: #181818;
    color: white;
}

.shat-container {
    width: 98%;
    max-width: 98%;
    background-color: #eee;
    border: #ddd 1px solid;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 98%;
}

body.dark-theme .shat-container {
    background-color: #2c2c2c;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #494949;
    color: white;
    padding: 8px;
    font-family: cursive;
}

.logo {
    height: 80px;
    margin-right: 8px;
}

.theme-toggle {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 8px;
}

.theme-toggle:hover {
    background-color: white;
    color: #0084ff;
}

body.dark-theme .theme-toggle {
    border-color: black;
    color: black;
}

body.dark-theme .theme-toggle:hover {
    background-color: black;
    color: white;
}

.shat-window {
    flex-grow: 1;
    height: 80%;
    padding: 16px;
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
}

.messages {
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 12px;
}

.message.user-message {
    align-self: flex-end;
    background-color: #0084ff;
    color: white;
    padding: 8px 12px;
    border-radius: 16px;
    max-width: 98%;
}

.message.bot-message {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: black;
    padding: 8px 12px;
    border-radius: 16px;
    max-width: 98%;
}

body.dark-theme .message.bot-message {
    background-color: #3a3a3a;
    color: white;
}

.input-container {
    display: flex;
    border-top: 2px solid #ccc;
    padding: 10px;
    height: 15%;
    box-sizing: border-box;
}

.user-input {
    flex-grow: 1;
    border: none;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 18px;
}

.user-input:focus {
    outline: none;
}

.send-button {
    background-color: #0084ff;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-left: 8px;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 18px;
    width:20%;
}

.send-button:hover {
    background-color: #006bbd;
}

.loading-message {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: black;
    padding: 8px 12px;
    border-radius: 16px;
    max-width: 98%;
    font-style: italic;
}

body.dark-theme .loading-message {
    background-color: #3a3a3a;
    color: white;
}

/* Responsive styles */
@media (max-width: 768px) {
    .shat-container {
        width: 98%;
        margin: 8px;    
        border-radius: 8px;

    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .top-bar h1{
        display: flex;
        float: left;
        flex-grow: 1;
        width: 60%;
    }
    .theme-toggle{   
        display: flex;
        float: left;     
        flex-grow: 1;
    }

    .logo {
        display: flex;
        float: left;
        height: 60px;        
        flex-grow: 1;
        width: 60px;
    }

    .theme-toggle {
        margin: 8px 0 0 0;
    }

    .user-input {
        padding: 12px;
        font-size: 16px;
    }

    .send-button {
        padding: 8px;
        font-size: 16px;
    }


body.dark-theme .shat-container {
    background-color: #2c2c2c;
}

.top-bar {
    font-size: 16px;
    padding: 8px;
}

.logo {
    height: 80px;
    margin-right: 8px;
}

.theme-toggle {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 8px;
}

.theme-toggle:hover {
    background-color: white;
    color: #0084ff;
}

body.dark-theme .theme-toggle {
    border-color: black;
    color: black;
}

body.dark-theme .theme-toggle:hover {
    background-color: black;
    color: white;
}

.shat-window {
    padding: 8px;
}

.messages {
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 12px;
}

.message.user-message {
    align-self: flex-end;
    background-color: #0084ff;
    color: white;
    padding: 8px 12px;
    border-radius: 16px;
    max-width: 98%;
}

.message.bot-message {
    align-self: flex-start;
    background-color: #e5e5ea;
    color: black;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 98%;
}

body.dark-theme .message.bot-message {
    background-color: #3a3a3a;
    color: white;
}

.input-container {
    padding: 10px;
    height: 10%;
}

.user-input {
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

.user-input:focus {
    outline: none;
}

.send-button {
    padding: 4px 8px;
    margin-left: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

.loading-message {
    padding: 8px 12px;
    border-radius: 16px;
}






}

@media (max-width: 480px) {
    .top-bar h1 {
        font-size: 24px;
    }

    .theme-toggle {
        font-size: 14px;
    }

    .user-input {
        padding: 8px;
        font-size: 14px;
    }

    .send-button {
        padding: 8px;
        font-size: 14px;
    }
}
.loading-dots {
    display: inline-block;
    position: relative;
    width: 1.2em;
    height: 1.2em;
}

.loading-dots div {
    position: absolute;
    margin-top: 14px;
    top: 14;
    width: 0.2em;
    height: 0.2em;
    border-radius: 50%;
    background: #333;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
    left: 0.1em;
    animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
    left: 0.1em;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
    left: 0.4em;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
    left: 0.7em;
    animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes loading-dots3 {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0);
    }
}

@keyframes loading-dots2 {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(0.3em, 0);
    }
}
