:root {
    --primary-color: #5819BE;
    --background-color-light: #fff;
    --text-color-dark: #333;
    --text-color-light: white;
    --background-color-sidebar: #EBE6F4;
    --border-color-light: #ccc;
    --background-color-card: rgba(28, 28, 28, 0.1);
    --background-color-message: rgba(88, 25, 190, 0.15);
    --background-color-message-divider: rgba(28, 28, 28, 0.05);
}

/* Page template */
.page-template-page-chat, .chat-template-default {
    height: 100vh;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 10px 50px;
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    height: 62px;
    z-index: 1;
}

.top-bar .logo {
    display: flex;
    align-items: center;
}

.top-bar .settings img {
    width: 30px;
}

.chat-top-bar .container {
    max-width: 100%;
}

.top-bar-right-icons {
    display: flex;
    align-items: center;
}

.top-bar-right-icons img {
    height: 30px;
    margin-left: 12px;
}

.top-bar-right-icons a {
    display: block;
    margin-right: 6px;
}

.mobile-logo {
    display: none;
}

.open-mobile-menu {
    display: none;
}

/* Chat Container */
.chat-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100%;
    padding-top: 62px;
    box-sizing: border-box;
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--background-color-sidebar);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.sidebar nav ul {
    list-style-type: none;
    padding: 0;
    width: 100%;
}

.sidebar nav ul li {
    margin: 20px 0;
}

.sidebar nav ul li a {
    text-decoration: none;
    color: var(--text-color-dark);
    font-size: 18px;
    padding: 10px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.sidebar nav ul li a img {
    margin-right: 10px;
    max-width: 20px;
}

.sidebar nav ul li a:hover {
    background-color: #ddd;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    padding-top: 0px;
    margin-bottom: 0px;
}

/* Header Logo */
.header-logo {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    padding-top: 40px;
}

.header-logo img {
    width: 100px;
}

/* Chat Content */
.chat-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    margin-top: 0px;
    padding-bottom: 20px;
    flex-wrap: wrap;
    overflow: auto;
}

/* Starter Cards */
.starter-cards {
    display: none;
    align-items: center;
    justify-content: center;
    width: 800px;
    flex-wrap: wrap;
}

/* Card */
.card {
    width: 380px;
    height: 160px;
    border: 1px solid var(--border-color-light);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    margin-right: 10px;
    margin-left: 10px;
    box-sizing: border-box;
    background-color: var(--background-color-card);
    cursor: pointer;
}

.card h2 {
    font-size: 18px;
    line-height: 24px;
}

.card p {
    font-size: 14px;
    line-height: 20px;
}

/* Message Input */
.message-input {
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.message-input-content {
    width: 80%;
    max-width: 760px;
    display: flex;
    border: 1px solid var(--border-color-light);
    min-height: 56px;
    border-radius: 16px;
    padding: 18px 26px;
    box-sizing: border-box;
    background: var(--background-color-light);
}

/* Chat Message */
.chat-dialog {
    width: 80%;
    max-width: 760px;
}

.chat-message {
    font-size: 16px;
    line-height: 24px;
    padding-bottom: 24px;
    padding-top: 24px;
    position: relative;
}

.chat-message:after {
    content: '';
    position: absolute;
    width: 90%;
    height: 1px;
    background: var(--background-color-message-divider);
    bottom: 0;
    right: 0;
}

.chat-message.user-message .chat-message-text {
    background: var(--background-color-message);
    text-align: right;
    padding: 10px;
    border-radius: 10px;
}

.chat-message.gpt-message .chat-message-text {
    background-image: url('../images/gpt-chat-icon.svg');
    background-repeat: no-repeat;
    background-position: top left;
    min-height: 32px;
    padding-left: 40px;
}

.chat-message-text img {
    width: 100%;
    max-width: 300px;
    margin-top: 12px;
    border-radius: 10px;

}

/* Chat Message Actions */
.chat-message-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
}

.chat-message-actions span {
    margin-left: 6px;
    cursor: pointer;
}

.message-input-small-text {
    font-size: 10px;
    line-height: 26px;
}

.message-input textarea {
    margin-right: 10px;
    font-size: 16px;
    line-height: 20px;
    outline: none;
    width: 100%;
    border: 0px;
    resize: none;
    height: 20px;
    padding: 0px;
}

.message-input button {
    background: none;
    border: 0px;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
}

.chat-message-text svg {
    width: 30px;
    height: 30px;
}

.favourite-content {
    padding: 62px;
    height: 100vh;
}

.favourite-item {
    padding-bottom: 30px;
    border-bottom: 1px solid #151515;
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 22px;
}

.favourite-item-answer {
    color: #151515;
    font-weight: 600;
    margin-bottom: 12px;
}

.favourite-item-date {
    font-size: 14px;
    margin-bottom: 20px;
    color: #535353;
}

.favourite-item-response {
    margin-bottom: 30px;
}

.favourite-item-url a {
    text-decoration: none;
    color: #5819BE;
}

.popup {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
}

.popup_body {
    padding: 32px 62px;
}

.popup.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup_inner {
    max-width: 880px;
    width: 100%;
    background-color: #fff;
    position: relative;
    overflow: scroll;
}

.popup_close {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
}

#chat_popup .price-block {
    padding-top: 0px;
}

#chat_popup .price-block-title {
    padding-left: 0px;
    width: 60%;
}

#chat_popup .price-block-title h2 {
    font-size: 32px;
    line-height: 38px;
}

#chat_popup .subs-plan-item {
    max-width: 226px;
    padding: 20px 20px;
}

#chat_popup .subs-plan-item-price-info {
    margin-top: 5px;
}

#chat_popup .subs-plan-item-info {
    margin-top: 10px;
}

#chat_popup .subs-plan-item-action {
    margin-top: 10px;
}

#chat_popup .subs-plan-item-top {
    font-size: 14px;
}

#chat_popup .subs-plan-item-info ul li {
    font-size: 12px;
    margin-bottom: 12px;
}

#chat_popup .subs-plan-item-action a {
    font-size: 12px;
    padding: 8px;
}

#chat_popup .subs-plan-item-action {
    height: 24px;
}



/* Accordion top*/
.chat-list-accordion {
    margin: auto;
    margin-top: 15px;
    box-sizing: border-box;
    background: rgba(88, 25, 190, 1);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 700px;

}

.chat-list-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}
.chat-list-item:last-of-type{
    border-bottom: none;
}
.chat-list-item span {
    display: block;
}
.chat-list-item-title{
    position: relative;
}
.chat-list-item-title img{
    margin-right: 4px;
}
.chat-list-item-title::after{
    width: 8px;
    height: 6px;
    background: url('../images/arrow-dropdown.svg');
    position: absolute;
    content: '';
    background-size: contain;
    right: 0px;
    top: 6px;
    transition: 0.2s;
}
.active .chat-list-item-title::after{
    transform: rotate(180deg);
}
.chat-description {
    display: none;
    background: #d1c4e9;
    color: black;
    padding: 10px;
    font-size: 12px;
    border-radius: 10px;
    margin-top: 10px;
    font-weight: normal;
}
.chat-description-text{
    margin-top: 10px;
}
.chat-description a{
    color: #fff;
    padding: 10px 24px 10px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(88, 25, 190, 1);
    text-decoration: none;
}
.chat-list-item.active .chat-description {
    display: block;
}
/* Accordion top */
/* Media Queries */
@media (min-width: 1660px) {
    .starter-cards {
        width: 1050px;
    }
}

@media (max-width: 768px) {
    .chat-list-accordion{
        margin-top: 0px;
        margin-left: 15px;
        margin-right: 15px;
        width: auto;
        max-width: 100%;
    }
    .top-bar {
        background-color: var(--background-color-light);
        padding: 0px 0px;
    }

    .chat-top.top-bar {
        padding: 15px 15px;
    }

    .desktop-logo {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .open-mobile-menu {
        display: block;
    }

    .settings {
        display: none;
    }

    .sidebar {
        display: none;
    }

    .card {
        margin-right: 0px;
        text-align: left;
        padding: 4px;
        height: auto;
    }

    .card h2 {
        font-size: 14px;
        margin: 0px;
    }

    .card p {
        font-size: 12px;
        margin: 0 0;
    }

    .starter-cards {
        width: 100%;
    }

    .chat-content {
        padding-bottom: 30px;
    }

    .main-content {
    }

    .message-input {
        width: 100%;
        bottom: 0;
        box-sizing: border-box;
    }

    .message-input-content {
        width: 90%;
        padding: 6px 14px;
        min-height: auto;
        display: flex;
        align-items: center;
    }

    .message-input-small-text {
        font-size: 8px;
        line-height: 14px;
    }

    .chat-message {
        font-size: 12px;
        line-height: 16px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .chat-message-actions span {
        margin-left: 12px;
    }

    .message-input button {
        height: 30px;
        align-self: flex-end;
    }

    .message-input button svg {
        width: 30px;
        height: 30px;
    }

    .chat-container {
        /*height: calc(100% - 62px);*/
    }

    .favourite-content {
        padding: 0px 15px;
    }

    .chat-container.favourite-container {
        padding-top: 0px;
    }

    .popup_body {
        padding: 30px 15px;
    }

    #chat_popup .price-block-title {
        width: 80%;
    }

    #chat_popup .subs-plans {
        flex-direction: row;
        align-items: stretch;
    }
    .popup_inner{
        height: 100%;
    }
}

@media (max-width: 767px) {
    #chat_popup .subs-plans {
        flex-direction: column;
        align-items: center;

    }

    #chat_popup .subs-plan-item {
        max-width: 100%;
    }

    .page-template-page-chat, .chat-template-default{
        display: flex;
        flex-direction: column;
        height: 100dvh;
    }

    .page-template-page-chat .top-bar, .chat-template-default .top-bar{
        position: sticky;
    }

   /* .page-template-page-chat .main-content{
        height: calc(100dvh - 62px);
    }*/
    .page-template-page-chat .chat-container, .chat-template-default .chat-container{
        padding-top: 0px;
    }

}