:root {
    --white: #fff;
    --primary: #5ED3F9;
    --primary-dark: #1f87a7;
    --primary-dark-rgb: 31, 135, 167;
    --primary-darker: #0a3846;
    --primary-light: #d6f5ff;
    --primary-rgb: 93, 212, 249;
    --primary-hover: #3aa0c1;
    --primary-active: #297e9a;
    --secondary: #06183f;
    --secondary-rgb: 6, 24, 63;
    --grey-1: #f9f9f9;
    --grey-2: #eee;
    --grey-3: #c6c6c6;;
    --radius: 8px;
}

body.app {
    margin: 3vh 2vw 0 2vw;
    display: flex;
    flex-direction: column;
    height: 94vh;
    background: var(--secondary);
    background-image: url(/img/xwrk-hero1.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

[x-cloak] {
    display: none !important;
}

header {
    position: sticky;
    top: 0;
    box-shadow: #00000026 0px 0px 5px 1px;
    z-index: 10;
    background: var(--white);
    border-radius: var(--radius) var(--radius) 0 0;
}

.layout {
    flex: 1;
    display: flex;
    min-height: 0;
    /* important for proper flex scrolling */
}

.sidebar {
    flex: 0 0 320px;
    background: var(--white);;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0;
    border-radius: 0 0 0 var(--radius);
}

@media (max-width: 767px) {
    .sidebar {
        display: none;
    }
}

.sidebar h3 {
    font-size: 0.8rem;
}

.main {
    flex: 1;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: 0 0 var(--radius) 0;
}

/* Scrollable content area in each column */
.content {
    flex: 1;
}

/* Sticky panel sits at the bottom */
.sticky-panel {
    position: sticky;
    bottom: 0;
    padding: 15px 30px;
    z-index: 5;
    display: flex;
    justify-content: center;
}

.chat-container {
    display: flex;
}

.chat-sidebar {
    overflow-y: auto;
    margin: 8px;
}

.chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
}

.chat-input {
    padding: 20px;
    background: var(--white);
    border-radius: calc(var(--radius) * 2);
    width: 66%;
    box-shadow: 1px 4px 9px 2px #0000001c;
}

.chat-bubble {
    display: inline-block;
    padding: 15px;
    margin: .5rem 0;
    border-radius: var(--radius);
    max-width: 75%;
    box-shadow: #00000014 1px 2px 1px 0px;
    position: relative;
}

.chat-bubble .message-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chat-bubble .message-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.chat-bubble:hover .message-actions,
.chat-bubble:focus-within .message-actions {
    opacity: 1;
}

.chat-bubble .message-copy {
    padding: 0;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-bubble .message-copy:hover,
.chat-bubble .message-copy:focus {
    opacity: 1;
}

.chat-bubble .message-copy[disabled] {
    opacity: 0.3;
    pointer-events: none;
}

.chat-bubble .message-copy.copied {
    opacity: 1;
}

.chat-bubble .message-timestamp {
    font-size: 0.65rem;
    text-align: right;
}

.session-list-item {
    position: relative;
    cursor: pointer;
    gap: 0.5rem;
}

.session-list-item .session-delete {
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    padding: 0;
    pointer-events: none;
}

.session-list-item:hover .session-delete,
.session-list-item:focus-within .session-delete {
    opacity: 1;
    pointer-events: auto;
}

.session-list-item .session-delete.session-delete-visible {
    opacity: 1;
    pointer-events: auto;
}

.chat-bubble.user {
    background: var(--primary-light);
    color: var(--primary-darker);
    align-self: flex-end;
}

.chat-bubble.spec {
    background: var(--white);
    color: var(--secondary);
    align-self: flex-start;
}

.user-avatar {
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    background-color: var(--white);
    color: var(--primary-dark);
}

.main>.container {
    margin-top: 30px;
}

.btn-primary {
    --bs-btn-color: var(--primary-darker);
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--primary-hover);
    --bs-btn-hover-border-color: var(--primary-active);
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: var(--primary-active);
    --bs-btn-active-border-color: var(--primary-active);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--white);
    --bs-btn-disabled-bg: var(--primary);
    --bs-btn-disabled-border-color: var(--primary);
}

a {
    --bs-link-color-rgb: var(--primary-dark-rgb);
}

.list-group-item {
    border-radius: var(--radius) !important;
    border-width: 0;
}

.list-group-item.active {
    --bs-list-group-active-bg: var(--grey-2);
    --bs-list-group-active-color: var(--primary-darker);
    --bs-list-group-active-border-color: var(--grey-2);
}

.list-group-flush>.list-group-item {
    border-width: 0;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}
