/* -------- GENERAL -------- */
html, body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    height: 100%;
    margin: 0;
    color: #2c3e50;
}

h1 {
    color: #1e272e;
}

#app {
    display: flex;
    width: 100vw;
}

/* -------- HEADER -------- */
#header {
    /* formatting */
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    flex: 1;
    width: 100%;

    /* appearance */
    border-bottom: 1px solid #ccc;
}

#header #left {
    padding-left: 16px;
}

#header #right {
    padding-right: 16px;
}

#header #right a {
    text-decoration: none;
    color: #1e272e;
}

/* -------- SIDEBAR -------- */
#sidebar {
    /* formatting */
    display: flex;
    position: relative;
    max-width: 20vw;
    min-width: 60px;
    width: 20vw;
    height: 100vh;
    
    /* dynamic formatting */
    transition: width 0.3s ease, min-width 0.3s ease;

    /* appearance */
    border-right: 1px solid #eee;
}

.sidebar-content {
    padding: 16px;
    overflow-y: auto;
    opacity: 1.0;
    transition: opacity 0.8s ease;
}

.sidebar-content .subtitle {
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
}

#toggle-button {
    /* formatting */
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

#sidebar-toggle {
    display: none;
}

#sidebar-toggle:checked ~ .sidebar-content {
    opacity: 0;
    visibility: hidden;
}

#sidebar:has(#sidebar-toggle:checked) {
    width: 3vw;
    min-width: 60px;
}  

#sidebar-toggle:checked + #toggle-button {
    transform: rotate(180deg);
    right: 8px;
}

/* -------- CHATBOT -------- */
#chatbot {
    /* formatting */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

#messages {
    /* formatting as parent */
    display: flex;
    flex-direction: column;
    
    /* formatting as child*/
    flex: 8;
    margin: 0 25%;
}

.bot-message {
    padding: 8px;
}

.user-message {
    /* formatting  */
    align-self: flex-end;
    max-width: 50%;

    /* appearance */
    background-color: #eee;
    padding: 8px;
    border-radius: 8px;
}

/* -------- INPUT -------- */

#input-container {
    /* formatting as parent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px;
    
    /* formatting as child */
    flex: 1.2;
}

#input {
    margin: 10px auto;  
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 25px; /* gives a modern pill shape */
    padding: 5px 15px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    background-color: #fff;
}

#input input {
    flex-grow: 1; 
    border: none;
    outline: none; /* Removes the blue ring when clicking */
    padding: 10px;
    font-size: 16px;
}

#input button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#input button:hover {
    background-color: #0056b3;
}