/* dm-sans-regular - latin-ext_latin */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    src: local(''),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-regular.woff2') format('woff2'),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-regular.woff') format('woff');
}

/* dm-sans-italic - latin-ext_latin */
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 400;
    src: local(''),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-italic.woff2') format('woff2'),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-italic.woff') format('woff');
}

/* dm-sans-500 - latin-ext_latin */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 500;
    src: local(''),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-500.woff2') format('woff2'),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-500.woff') format('woff');
}

/* dm-sans-500italic - latin-ext_latin */
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 500;
    src: local(''),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-500italic.woff2') format('woff2'),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-500italic.woff') format('woff');
}

/* dm-sans-700 - latin-ext_latin */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 700;
    src: local(''),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-700.woff2') format('woff2'),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-700.woff') format('woff');
}

/* dm-sans-700italic - latin-ext_latin */
@font-face {
    font-family: 'DM Sans';
    font-style: italic;
    font-weight: 700;
    src: local(''),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-700italic.woff2') format('woff2'),
    url('/static/fonts/dm-sans-v6-latin-ext_latin-700italic.woff') format('woff');
}

/* dm-serif-display-regular - latin-ext_latin */
@font-face {
    font-family: 'DM Serif Display';
    font-style: normal;
    font-weight: 400;
    src: local(''),
    url('/static/fonts/dm-serif-display-v5-latin-ext_latin-regular.woff2') format('woff2'),
    url('/static/fonts/dm-serif-display-v5-latin-ext_latin-regular.woff') format('woff');
}

/* dm-serif-display-italic - latin-ext_latin */
@font-face {
    font-family: 'DM Serif Display';
    font-style: italic;
    font-weight: 400;
    src: local(''),
    url('/static/fonts/dm-serif-display-v5-latin-ext_latin-italic.woff2') format('woff2'),
    url('/static/fonts/dm-serif-display-v5-latin-ext_latin-italic.woff') format('woff');
}

:root {
    --primary-color: #FF545F; /* privatim's primary color used globally*/
    --hover-color: rgba(149, 43, 50, 0.8); /* hover = primary but darker */
    --secondary-hover-color: #e9ecef;
    --icon-size: 40px;
    --icon-font-size: calc(var(--icon-size) * 0.5);
    --timeline-padding-left: calc(var(--icon-size) * 2);
    --timeline-line-left: calc(var(--icon-size) * 0.75);
    --timeline-icon-left: calc(var(--icon-size) * 0.4);
    --background-color: rgb(244, 242, 238);
    --tw-gradient-stops: hsl(50, 30%, 92%), hsl(50 23.1% 94.9% / 1);
    --light-brown-border-color: hsl(46, 24%, 68%);
    --brown-border-color: hsl(48, 12.5%, 39.2%);
    --dimmed-white-background: hsl(60, 6.7%, 97.1%);
    --border-radius: 10px;
    /* ======== Overwrite bootstrap global variables ======= */
    /* This is very useful in order to make global changes. */
    /* See also https://www.getbootstrap.cn/docs/5.3/customize/css-variables/ */
    --bs-border-radius: 16px;
    --bs-body-font-family: "DM Sans", sans-serif;
}


/* Removes all focus shadows */
*:focus {
    box-shadow: none !important;
}

#main-title {
    margin-top: 1.0rem;
    padding-top: 1.3rem;
    margin-bottom: 1.0rem;
    padding-botom: 1.3rem;
}

.main-content {
    /* Set container background color to a pleasant light brown. */
    background-color: var(--background-color);
    padding-bottom: 2rem;
}

body {
    font-family: "DM Sans", sans-serif;
}

p, textarea.form-control {
    line-height: 1.3;
    font-size: 1.05rem;
}

.bg-light {
    background-color: #EDEDED !important;
}

.dimmed-white-background {
    background-color: var(--dimmed-white-background) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

a.btn-primary:hover {
    color: white !important;
}

a {
    /* set color for all links */
    color: var(--primary-color);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--secondary-hover-color);
    color: white;
}

a:hover {
    color: var(--hover-color) !important;
    text-decoration: none;
}


/* Navbar */
#active_tab {
    text-decoration: underline !important;
    text-decoration-color: var(--primary-color) !important;
    text-decoration-thickness: 0.3rem !important;
    text-underline-offset: 1.25rem;
}

.nav-link {
    color: var(--primary-color) !important;
    font-size: 1.2rem;
    transition: all 0.3s ease; /* Smooth transition for all changes */
}

.nav-link:hover,
.nav-link:focus {
    color: var(--hover-color) !important; /* Change color on hover/focus */
}

.nav-link:active {
    color: var(--hover-color) !important; /* Change color when clicked */
    transform: scale(0.98); /* Slight scale down effect when clicked */
}


.bd-mode-toggle .dropdown-menu .active .bi {
    display: block !important;
}

#search-button {
    border: none;
}

#search-button:hover {
    background-color: transparent;
    color: var(--primary-color);
}


/* Fix double border in form*/
.ts-control {
    border: none;
}

/* Card section in overview*/
.activity-card-wrapper {
    display: flex;
    margin: 1rem 0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: var(--border-radius);
    transition: all 0.1s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

.consultation-card {
    cursor: pointer;
    max-width: 100%;
}

.d-flex.flex-column.flex-md-row {
    width: 100%;
}


/* New hover effect styles */
.activity-card-wrapper:hover {
    transform: scale(1.01);
}

.rounded-circle {
    object-fit: cover;
}

.card-body {
    flex: 1;
    /* Add word breaking for long content */
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Ensure links break */
    word-break: break-word;
}

/* Make sure links also break properly */
.card-body a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Add max-width to ensure content stays within bounds */
.consultation-card {
    max-width: 100%;
}

/* Ensure the content flex container respects boundaries */
.d-flex.flex-column.flex-md-row {
    width: 100%;
}

/* Make sure paragraphs also handle long content properly */
.card-text p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.consultation-profile-section {
    width: 180px;
    word-wrap: break-word;
    overflow-wrap: break-word;

    flex-direction: column;
    align-items: center;
}

.consultation-profile-section p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.profile-name, .details-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.text-primary {
    color: var(--primary-color) !important;
}

.consultation-profile-section img {
    width: 100px;
    height: 100px;
}

.tag-button {
    background-color: #ededed;
    border-color: #ededed;
    color: #333 !important;
    font-weight: normal;
}

main {
    margin-bottom: 2rem;
}

.form-signin input[type="email"] {
    margin-top: 20px;
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
    margin-bottom: 20px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
}

/* icon sidebar */
.document-link {
    display: flex;
    align-items: center;
}

.fas {
    margin-right: 10px; /* Add space between the icon and the text */
}

.icon-container {
    display: flex; /* Makes the file icon be on the same height as the text */
    align-items: center; /* Ensure the icon is centered vertically */
}

.agenda-item-accordion {
    display: flex;
}

span.accordion-text-9 {
    flex-grow: 9; /* Make the agenda item text take up 90% of the space */
    text-align: left;
}

/* 'resource-collection' means this cluster of lists of _stuff_, typically listed at the top of the page, like
"documents", "attendees", "links".  */
.resource-collection * {
    margin-top: 5px;
    margin-bottom: 5px;
}

.fix-checkbox-in-list {
    margin-left: 1px !important;
}


.generic-user-list-container {
    display: flex;
    gap: 1.5rem;
}

.generic-user-list {
    list-style: none;
}

.user-list-item {
    color: var(--primary-color);
}


/* Start search results */
mark {
    background-color: yellow;
    color: black;
    font-weight: bold;
    padding: 0 5px;
    border-radius: 3px;
}

/* consultation */
.consultation-main-text {
    min-height: 8.1rem;
    padding: 2.0rem 2.0rem;
}

.consultation-body {
    border-radius: var(--border-radius);
}

.claude-element {
    padding: 1.0rem; /* Adjust as needed */
    border-radius: var(--border-radius);
    border: none;
}

.claude-element .list-group-item {
    background-color: transparent;
    border: none;
}

.filter-form {
    max-width: 100%;
    padding: 1.5rem 0.0rem 1.5rem 1.5rem;
}

.filter-form .form-control,
.filter-form .form-select,
.filter-form .btn-submit {
    margin-bottom: 10px;
}

.filter-form .btn-submit {
    display: block;
    width: 100%;
}


input[type="checkbox"]:checked {
    accent-color: var(--primary-color);
}

/* Custom checkbox styling */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: none;
}

/* https://stackoverflow.com/a/48484022/ */
/* Prevent having a blue outline (default) everywhere */
.form-control:focus,
.form-select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
    border-color: rgba(255, 84, 95, 0.8);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(255, 84, 95, 0.6);
    outline: none;
}


.consultations-content-width {
    width: 80%;
}

.sidebar-filter {
    width: 20%;
}

.make-line-breaks-in-p {
    white-space: pre-line;
}


.timeline {
    position: relative;
}


.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--timeline-line-left);
    width: 2px;
    background: #ddd;
}

/* remove the line above the first item */
.timeline-item:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 50%;
    left: var(--timeline-line-left);
    width: 2px;
    background: var(--background-color); /* Same color as the background to hide the line */
    z-index: 0;
}

/* Remove the line below the last item */
.timeline-item:last-child::after {
    content: '';
    position: absolute;
    top: 50%;
    bottom: 0;
    left: var(--timeline-line-left);
    width: 2px;
    background: var(--background-color); /* Same color as the background to hide the line */
    z-index: 0;
}


.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: var(--timeline-padding-left);
}

.timeline-content {
    background-color: rgb(248, 248, 247);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.1s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

/* New hover effect styles */
.timeline-item:hover .timeline-content {
    transform: scale(1.01);
}

.timeline-icon {
    position: absolute;
    left: var(--timeline-icon-left);
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    font-size: 1.5rem;
}


.content-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.content-link:hover {
    text-decoration: none;
    color: inherit !important;
}

.timeline-title {
    margin-top: 0;
}

.timeline-info {
    font-size: 0.9em;
    color: #6c757d;
}

.timeline-body {
    margin-top: 10px;
}

/* Editor */
.element {
    background-color: #fff;
    /*border: 1px solid var(--brown-border-color);*/
    height: 200px; /*font-size: 0.85rem;*/
    overflow-y: auto;
    cursor: text;
    /*font-size: 0.85rem;*/
    padding: 1rem;
    border-radius: 1rem;
}

.editor-probs {
    outline: none;
}

.rounded-table {
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--background-color);
}

.rounded-table td, .rounded-table th {
    padding: 1.3rem;
}

.rounded-table tr {
    border-bottom-color: var(--background-color);
}

.tag-sidebar {
    border: 1px solid var(--light-brown-border-color);
    padding: 0.8rem;
    background-color: var(--dimmed-white-background);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-sidebar .tag {
    display: inline-block;
    margin: 4px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    cursor: default; /* Added normal cursor */
    transition: background-color 0.3s ease;
}

.tag-sidebar:hover {
    background-color: #d0d0d0;
}

.cons-sidebar-title {
    margin-bottom: 1.5rem;
}

.card {
    border-color: var(--background-color);
}

.attendance-container {
    width: 100%;
}

.attendance-list {
    max-width: 500px;
    width: 100%;
}

.attendance-header, .attendance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.attendance-header {
    font-weight: bold;
    border-bottom: 1px solid #ccc;
}

.attendance-row {
    border-bottom: 1px solid #eee;
}

.attendee-name {
    flex: 1;
    padding-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendee-name input {
    width: 100%;
    background: transparent;
    border: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attendee-status {
    width: 80px;
    display: flex;
    justify-content: center;
}

.no-white-background {
    background: transparent !important;
}


.alert-success {
    transition: opacity 0.5s ease-out, max-height 0.5s ease-out;
    max-height: 200px;
    opacity: 1;
    overflow: hidden;
}

.alert-success.hiding {
    opacity: 0;
    max-height: 0;
}


.badge.bg-consultation {
    background-color: #c6acae !important;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-outline-dark:hover {
    color: green !important;
    background-color: #b3bbc1;
}

.profile-pic-container {
    width: 24px;
    height: 24px;
    overflow: hidden;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-list-item {
    display: flex;
    align-items: center;
}

.user-list-item a {
    text-decoration: none;
}

.testBadge {
    background-color: #f8b44f;
    font-size: 1.6rem;
}

/* Fix list generated by editor being too far on the left. */
.consultation-main-text ul {
  margin-left: 1.0rem;
}

/* Fix distance of <li> items in list generated by editor. */
.consultation-main-text ul li p {
    margin: 0;
}

.custom-truncate {
    position: relative;
    max-height: 25rem;
    overflow: hidden;
}

.custom-truncate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4rem;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

/* Base styles for all statuses */
.consultation-status {
    margin-bottom: 1.0rem;
    display: inline-block;
    padding: 4px 4px;
    border-radius: 12px;
    border: 1px solid;
}

/* Make non-active filters less prominent */
.filter-badges .consultation-status {
    opacity: 0.6;
    transition: opacity 0.2s ease-in-out; /* Smooth transition */
}

.consultation-status i {
    padding-left: 0.5rem;
}

.consultation-status span {
    padding-right: 0.5rem;
}

/* --- Status Specific Colors (Subtle Tints) --- */
/* Status: Created */
.consultation-status.status-created {
    background-color: #e0f7fa;
    border-color: #b2ebf2;
    color: #00796b;
}
.consultation-status.status-created:hover {
    background-color: #cbeef3; /* Slightly darker cyan */
    border-color: #a1e4ed; /* Slightly adjusted border */
}

/* Status: Closed */
.consultation-status.status-closed {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}
/* Uses the default hover state */
.consultation-status.status-closed:hover {
    background-color: #e9ecef;
}


/* Status: In Progress */
.consultation-status.status-in-progress {
    background-color: #e7f5ff;
    border-color: #cce5ff;
    color: #0d6efd;
}
.consultation-status.status-in-progress:hover {
    background-color: #d1eaff; /* Slightly darker blue */
    border-color: #b8daff; /* Slightly adjusted border */
}

/* Status: Waiving */
.consultation-status.status-waiving {
    background-color: #fff8e1;
    border-color: #ffecb3;
    color: #e65100;
}
.consultation-status.status-waiving:hover {
    background-color: #fff1c6; /* Slightly darker yellow */
    border-color: #ffe5a0; /* Slightly adjusted border */
}

/* Ensure icon inherits the text color */
.consultation-status i {
    color: inherit;
}


.generic-user-list {
  column-count: 2;
  column-gap: 20px;
  list-style: none;
  padding: 0;
}

.generic-user-list .user-list-item {
  break-inside: avoid-column; /* Try to keep items from breaking */
  page-break-inside: avoid;
  padding-bottom: 5px;
}

.active-filter .consultation-status {
    opacity: 1; /* Ensure active filter is fully opaque */
    border-width: 2px; /* Slightly thicker border */
    border-style: solid; /* Ensure border style is solid */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
}
