/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

:root {
    --text-color: #FFFFFF;
    --icon-color: #ACACBE;
    --icon-hover-bg: #5b5e71;
    --placeholder-color: #dcdcdc;
    --outgoing-chat-bg: #343541;
    --incoming-chat-bg: #444654;
    --outgoing-chat-border: #343541;
    --incoming-chat-border: #444654;
    /* markdown */
    --color-prettylights-syntax-comment: #8b949e;
    --color-prettylights-syntax-constant: #79c0ff;
    --color-prettylights-syntax-entity: #d2a8ff;
    --color-prettylights-syntax-storage-modifier-import: #c9d1d9;
    --color-prettylights-syntax-entity-tag: #7ee787;
    --color-prettylights-syntax-keyword: #ff7b72;
    --color-prettylights-syntax-string: #a5d6ff;
    --color-prettylights-syntax-variable: #ffa657;
    --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
    --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
    --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
    --color-prettylights-syntax-carriage-return-text: #f0f6fc;
    --color-prettylights-syntax-carriage-return-bg: #b62324;
    --color-prettylights-syntax-string-regexp: #7ee787;
    --color-prettylights-syntax-markup-list: #f2cc60;
    --color-prettylights-syntax-markup-heading: #1f6feb;
    --color-prettylights-syntax-markup-italic: #c9d1d9;
    --color-prettylights-syntax-markup-bold: #c9d1d9;
    --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
    --color-prettylights-syntax-markup-deleted-bg: #67060c;
    --color-prettylights-syntax-markup-inserted-text: #aff5b4;
    --color-prettylights-syntax-markup-inserted-bg: #033a16;
    --color-prettylights-syntax-markup-changed-text: #ffdfb6;
    --color-prettylights-syntax-markup-changed-bg: #5a1e02;
    --color-prettylights-syntax-markup-ignored-text: #c9d1d9;
    --color-prettylights-syntax-markup-ignored-bg: #1158c7;
    --color-prettylights-syntax-meta-diff-range: #d2a8ff;
    --color-prettylights-syntax-brackethighlighter-angle: #8b949e;
    --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
    --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
    --color-fg-default: #e6edf3;
    --color-fg-muted: #848d97;
    --color-fg-subtle: #6e7681;
    --color-canvas-default: #373839;
    --color-canvas-subtle: #444654;;
    --color-border-default: #6c6c6c;
    --color-border-muted: #21262d;
    --color-neutral-muted: rgba(110, 118, 129, 0.4);
    --color-accent-fg: #2f81f7;
    --color-accent-emphasis: #1f6feb;
    --color-success-fg: #3fb950;
    --color-success-emphasis: #238636;
    --color-attention-fg: #d29922;
    --color-attention-emphasis: #9e6a03;
    --color-attention-subtle: rgba(187, 128, 9, 0.15);
    --color-danger-fg: #f85149;
    --color-danger-emphasis: #da3633;
    --color-done-fg: #a371f7;
    --color-done-emphasis: #8957e5;
}

.light-mode {
    --text-color: #343541;
    --icon-color: #a9a9bc;
    --icon-hover-bg: #f1f1f3;
    --placeholder-color: #6c6c6c;
    --outgoing-chat-bg: #FFFFFF;
    --incoming-chat-bg: #F7F7F8;
    --outgoing-chat-border: #FFFFFF;
    --incoming-chat-border: #D9D9E3;
    /* markdown */
    --color-prettylights-syntax-comment: #57606a;
    --color-prettylights-syntax-constant: #0550ae;
    --color-prettylights-syntax-entity: #6639ba;
    --color-prettylights-syntax-storage-modifier-import: #24292f;
    --color-prettylights-syntax-entity-tag: #116329;
    --color-prettylights-syntax-keyword: #cf222e;
    --color-prettylights-syntax-string: #0a3069;
    --color-prettylights-syntax-variable: #953800;
    --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
    --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
    --color-prettylights-syntax-invalid-illegal-bg: #82071e;
    --color-prettylights-syntax-carriage-return-text: #f6f8fa;
    --color-prettylights-syntax-carriage-return-bg: #cf222e;
    --color-prettylights-syntax-string-regexp: #116329;
    --color-prettylights-syntax-markup-list: #3b2300;
    --color-prettylights-syntax-markup-heading: #0550ae;
    --color-prettylights-syntax-markup-italic: #24292f;
    --color-prettylights-syntax-markup-bold: #24292f;
    --color-prettylights-syntax-markup-deleted-text: #82071e;
    --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
    --color-prettylights-syntax-markup-inserted-text: #116329;
    --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
    --color-prettylights-syntax-markup-changed-text: #953800;
    --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
    --color-prettylights-syntax-markup-ignored-text: #eaeef2;
    --color-prettylights-syntax-markup-ignored-bg: #0550ae;
    --color-prettylights-syntax-meta-diff-range: #8250df;
    --color-prettylights-syntax-brackethighlighter-angle: #57606a;
    --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
    --color-prettylights-syntax-constant-other-reference-link: #0a3069;
    --color-fg-default: #1F2328;
    --color-fg-muted: #656d76;
    --color-fg-subtle: #6e7781;
    --color-canvas-default: #ffffff;
    --color-canvas-subtle: #f6f8fa;
    --color-border-default: #d0d7de;
    --color-border-muted: hsla(210, 18%, 87%, 1);
    --color-neutral-muted: rgba(175, 184, 193, 0.2);
    --color-accent-fg: #0969da;
    --color-accent-emphasis: #0969da;
    --color-success-fg: #1a7f37;
    --color-success-emphasis: #1f883d;
    --color-attention-fg: #9a6700;
    --color-attention-emphasis: #9a6700;
    --color-attention-subtle: #fff8c5;
    --color-danger-fg: #d1242f;
    --color-danger-emphasis: #cf222e;
    --color-done-fg: #8250df;
    --color-done-emphasis: #8250df;
}

body {
    background: var(--outgoing-chat-bg);
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
}


/* Chats container styling */
.chat-container {
    flex: 1;
    overflow-y: auto;
    max-height: 100vh;
    height: 100%;
    padding-bottom: 150px;
    border-top: 1px solid var(--incoming-chat-border);
}

:where(.chat-container, textarea)::-webkit-scrollbar {
    width: 6px;
}

:where(.chat-container, textarea)::-webkit-scrollbar-track {
    background: var(--incoming-chat-bg);
    border-radius: 25px;
}

:where(.chat-container, textarea)::-webkit-scrollbar-thumb {
    background: var(--icon-color);
    border-radius: 25px;
}

.default-text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 70vh;
    padding: 0 10px;
    text-align: center;
    color: var(--text-color);
}

.default-text h1 {
    font-size: 3.3rem;
}

.default-text p {
    margin-top: 10px;
    font-size: 1.1rem;
}

.chat-container .chat {
    padding: 25px 10px;
    display: flex;
    justify-content: center;
    color: var(--text-color);
}

.chat-container .chat.outgoing {
    background: var(--outgoing-chat-bg);
    border: 1px solid var(--outgoing-chat-border);
}

.chat-container .chat.incoming {
    background: var(--incoming-chat-bg);
    border: 1px solid var(--incoming-chat-border);
}

.chat .chat-content {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    overflow: auto;
    max-width: 100%;
}

span.material-symbols-rounded {
    user-select: none;
    cursor: pointer;
}

.chat .chat-content span {
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--icon-color);
    visibility: hidden;
}

.chat:hover .chat-content:not(:has(.typing-animation), :has(.error)) span {
    visibility: visible;
}

.chat .chat-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat .chat-details img {
    width: 35px;
    height: 35px;
    align-self: flex-start;
    object-fit: cover;
    border-radius: 2px;
    border-radius: 30%;
}

.chat .chat-details p {
    white-space: pre-wrap;
    font-size: 1.05rem;
    padding: 0 50px 0 25px;
    color: var(--text-color);
    word-break: break-word;
}

.chat .chat-details p.error {
    color: #e55865;
}

.chat .typing-animation {
    padding-left: 25px;
    display: inline-flex;
}

.typing-animation .typing-dot {
    height: 7px;
    width: 7px;
    border-radius: 50%;
    margin: 0 3px;
    opacity: 0.7;
    background: var(--text-color);
    animation: animateDots 1.5s var(--delay) ease-in-out infinite;
}

.typing-animation .typing-dot:first-child {
    margin-left: 0;
}

@keyframes animateDots {

    0%,
    44% {
        transform: translateY(0px);
    }

    28% {
        opacity: 0.4;
        transform: translateY(-6px);
    }

    44% {
        opacity: 0.2;
    }
}

/* Typing container styling */
.typing-container {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    padding: 20px 10px;
    justify-content: center;
    background: var(--outgoing-chat-bg);
    border-top: 1px solid var(--incoming-chat-border);
}

.typing-container .typing-content {
    display: flex;
    max-width: 950px;
    width: 100%;
    align-items: flex-end;
}

.typing-container .typing-textarea {
    width: 100%;
    display: flex;
    position: relative;
}

.typing-textarea textarea {
    resize: none;
    height: 55px;
    width: 100%;
    border: none;
    padding: 15px 45px 15px 20px;
    color: var(--text-color);
    font-size: 1rem;
    border-radius: 4px;
    max-height: 250px;
    overflow-y: auto;
    background: var(--incoming-chat-bg);
    outline: 1px solid var(--incoming-chat-border);
}

.typing-textarea textarea::placeholder {
    color: var(--placeholder-color);
}

.typing-content span {
    width: 55px;
    height: 55px;
    display: flex;
    border-radius: 4px;
    font-size: 1.35rem;
    align-items: center;
    justify-content: center;
    color: var(--icon-color);
}

.typing-textarea span {
    position: absolute;
    right: 0;
    bottom: 0;
    visibility: hidden;
}

.typing-textarea textarea:valid ~ span {
    visibility: visible;
}

.typing-controls {
    display: flex;
}

.typing-controls span {
    margin-left: 7px;
    font-size: 1.4rem;
    background: var(--incoming-chat-bg);
    outline: 1px solid var(--incoming-chat-border);
}

.typing-controls span:hover {
    background: var(--icon-hover-bg);
}

/* Reponsive Media Query */
@media screen and (max-width: 600px) {
    .default-text h1 {
        font-size: 2.3rem;
    }

    :where(.default-text p, textarea, .chat p) {
        font-size: 0.95rem !important;
    }

    .chat-container .chat {
        padding: 20px 10px;
    }

    .chat-container .chat img {
        height: 32px;
        width: 32px;
    }

    .chat-container .chat p {
        padding: 0 20px;
    }

    .chat .chat-content:not(:has(.typing-animation), :has(.error)) span {
        visibility: visible;
    }

    .typing-container {
        padding: 15px 10px;
    }

    .typing-textarea textarea {
        height: 45px;
        padding: 10px 40px 10px 10px;
    }

    .typing-content span {
        height: 45px;
        width: 45px;
        margin-left: 5px;
    }

    span.material-symbols-rounded {
        font-size: 1.25rem !important;
    }
}

.squeeze-and-disappear {
    animation: squeezeAndDisappear 2s forwards;
    animation-delay: 1s;
}

@keyframes squeezeAndDisappear {
    0% {
        transform: scaleX(1) scaleY(1);
        opacity: 1;
    }

    100% {
        transform: scaleX(0.6) scaleY(0.6);
        opacity: 0;
    }
}

.sidebar {
    width: 50px;
    border-right: 1px solid var(--incoming-chat-border);
    height: 100%;
    color: var(--text-color);
    background-color: var(--outgoing-chat-bg);
    transition: width 0.3s ease;
    overflow: hidden;
    flex-direction: column;
}

.sidebar.open {
    width: 305px;
    min-width: 305px;
}

.sidebar-content {
    padding: 20px;
    height: 100%;

}

.sidebar-content p {
    margin-top: 10px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    color: var(--text-color);
    background-color: var(--outgoing-chat-bg);
    font-size: 24px;
    position: fixed;
    top: 0;
    left: 0;
}

.card-container {
    margin-top: 50px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card {
    color: var(--text-color);
    background-color: var(--outgoing-chat-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
}

.card img {
    width: 10%;
    height: auto;
}

.card ul {
    margin-left: 35px;
}

.card ul li {
    font-size: 13px;
    margin-left: 15px;
}

.card ul li:hover {
    background: var(--icon-hover-bg);
}

.card-content {
    padding: 5px;
    width: 100%;
    font-family: Arial, sans-serif;
    display: block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0.98;
}

/* Modal content box */
.modal-content {
    background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent modal */
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 70%; /* Define the maximum height */
    overflow-y: auto; /* Makes the modal content scrollable */
}

.text-area {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

.submitBtn {
    background-color: #4CAF50; /* Green background */
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Animation for hover */
}

/* Button hover effect */
.submitBtn:hover {
    background-color: #45a049; /* Darker green */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Active button effect */
.submitBtn:active {
    background-color: #3e8e41;
    transform: translateY(1px); /* Pressed down effect */
}

/* Close button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover, .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.log {
    font-family: Arial, sans-serif;
}

.log ul {
    list-style-type: none;
    padding: 0;
}

.log li {
    margin: 10px 0;
    padding: 10px;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.time {
    font-weight: bold;
    color: #2c3e50;
}

.level {
    color: #2980b9;
}

.message {
    color: #27ae60;
}

.highlight {
    background-color: yellow;
    font-weight: bold;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgb(68, 70, 84);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    /* Position the tooltip above the text */
    left: 50%;
    margin-left: -150px;
    /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 0.75;
}

.menu {
    display: none;
    position: fixed;
    bottom: 70px;
    right: 1%;
    color: var(--text-color);
    background-color: var(--outgoing-chat-bg);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu li {
    border-bottom: 1px solid #444;
    cursor: pointer;
    font-size: 12px;
    width: 150px;
    display: flex;
    align-items: center;
}

.menu li:hover {
    background-color: var(--icon-hover-bg);
}

.menu li:last-child {
    border-bottom: none;
}

#popup {
    display: none;
    width: 300px;
    padding: 20px;
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ccc;
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.avatar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: none;
}

.container-wrapper {
    display: flex;
    width: calc(100% - 305px);
    height: 100%;
    flex-direction: column;

}

.canvas {
    height: 60%;
    display: flex;
    flex-direction: row;
}

.leftCanvas {
    width: 60%;
    height: 85%;
    align-self: center;
}

.rightCanvas {
    width: 40%;
    height: 100%;
    display: flex;
    justify-content: center;
}

.upperLeftCanvas {
    height: 50%;
    display: flex;
    justify-content: center;
}

.lowerLeftCanvas {
    height: 50%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.resMap {
    width: 85%;
    height: 85%;
    justify-self: center;
    align-self: center;
}

.upperLeftCanvas > table {
    max-height: 100% !important;
}

.banner {
    display: inline-block;
    position: relative;
    width: 100%;
}

.title-overlay {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
}

.banner-subtitle {
    font-size: 1.5rem;
    font-weight: bold;
}

.banner-title {
    font-size: 2rem;
}
