html, body {
    height: 100%;
    margin: 0;
}

main {
    background-color: rgb(249 250 251);
    z-index: 0;
}

.w-120 {
    width: 30rem;
}

/* Layout */
.container {
    display: flex;
    padding: 0;
    width: 100%;
    /*max-width: 1200px;*/
    /*margin: 0 auto; !* Center container itself horizontally in the parent *!*/
    justify-content: center; /* Center content horizontally */
    /*align-items: center; !* Center content vertically *!*/
    height: 100vh; /* Optional: set a height to center within */
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.section-container {
    background-color: var(--theme-base-100);
}

/* Navigation */
.nav-link { display: block; padding: 0.5rem; color: #333; text-decoration: none; margin: 2px 0; border-radius: 4px; }
.nav-link.active { background-color: #374151; color: white; }
.nav-link:hover:not(.active) { background-color: #f1f5f9; }

/* User Info */
.user-info {
    margin-top: auto; /* This pushes it to the bottom */
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
}

.user-info div:last-child {
    margin-top: 1rem;  /* Add space between the login/logout button and the user-info text */
}

.roles {
    color: #666;
}

.copyright {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.75rem;
}

.logout-btn, .login-btn {
    background: #374151;
    color: white;
    border: none;
    padding: 0.4rem;
    margin-top: 1rem;
    border-radius: 4px;
}

/* Top Bar */
.top-bar { display: flex; justify-content: flex-end; padding: 1rem; }
.action-btn { background: #0277bd; color: white; border: none; padding: 0.5rem 1rem; border-radius: 4px; margin-left: 0.5rem; }

/* Content */
.content {
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
}
.questions {
    margin-top: 1rem;
}
.question {
    background-color: rgb(254 243 199);  /* bg-amber-100 */
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem; }

/* Artifacts */
.artifact-grid { gap: 2rem; }
.artifact-section, .action-section {
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.artifact-item, .action-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}
.artifact-item:last-child, .action-item:last-child {
    border-bottom: none;
}
.action-item {
    color: #0277bd;
    cursor: pointer;
}
.action-item:hover {
    color: #015a8e;
}

.login_modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2em;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.login_modal.show {
    display: block;
}

/* Validation */
.validation-error {
    color: red;
    font-size: 0.8em;
    display: none;
}
.validation-error.show {
    display: block;
}
input:invalid {
    border-color: red;
}

/* HTML5 Browser Validation */
input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: red;
}

/* Customize tooltip appearance */
input::-webkit-validation-bubble-message {
    display: none;
}

input::validation-bubble-message {
    display: none;
}

/* Custom tooltip using pseudo-elements */
input:invalid:not(:focus):not(:placeholder-shown)::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.background {
    position: absolute;
    background-size: cover; /* Ensures the image fills the div */
	background-repeat: no-repeat;
	z-index: -1;
}

.background-top-left {
    /*top: 0;*/
    /*left: 0;*/
    /*width: 400px;*/
    /*height: 400px;*/
    /*background-image: url('/assets/img/bg-top-left.png');*/
}

.background-top-right {
    top: 0;
    right: 0;
    width: 800px;
    height: 800px;
    background-image: url('/assets/img/bg-top-right.png');
}

.background-bottom-left {
    bottom: 0;
    left: 0;
    width: 800px;
    height: 1000px;
    background-image: url('/assets/img/bg-bottom-left.png');
}

.background-bottom-right {
    /*bottom: 0;*/
    /*right: 0;*/
    /*width: 400px;*/
    /*height: 400px;*/
    /*background-image: url('/assets/img/bg-bottom-right.png');*/
}

@keyframes flash {
  0% {
    background-color: yellow !important;
  }
  100% {
    background-color: transparent !important;
  }
}

.animate-flash {
  animation: flash 1s ease-in-out !important;
}

input:invalid {
    border-color: red !important;
    border-width: 12px !important;
}

/*.alert-success-text.validation-indicator::before {*/
/*    font-family: "Font Awesome 6 Free"; !* Use the appropriate Font Awesome version *!*/
/*    content: "\f00c"; !* Unicode for Font Awesome 'check' icon *!*/
/*    font-weight: 900; !* Adjust based on the icon style (solid, regular, etc.) *!*/
/*}*/

/*.alert-error-text.validation-indicator::before {*/
/*    font-family: "Font Awesome 6 Free"; !* Use the appropriate Font Awesome version *!*/
/*    content: "\f00d"; !* Unicode for Font Awesome 'times' icon *!*/
/*    font-weight: 900; !* Adjust based on the icon style (solid, regular, etc.) *!*/
/*}*/

.error { color: red; min-height: 20px; font-size: 0.9em; }
.valid { color: green; }
.error-summary {
    border: 1px solid red;
    padding: 1rem;
    /*margin: 1rem 0;*/
    display: none;
    border-radius: 4px;
    background: #fff5f5;
}
.error-summary.show { display: block; }
input:invalid { border-color: red; }
input:valid {
    /*border-color: green;*/
}
input.validated-invalid { border-color: red; }
input.validated-valid { border-color: green; }

button {
  font-size: 0.9rem !important; /* Equivalent to text-xl in Tailwind */
  /*line-height: 1.75rem !important; !* Ensures proper spacing *!*/
}

button:disabled { opacity: 0.5; cursor: not-allowed; }
.validation-indicator::before {
    display: inline-block;
    width: 20px;
    margin-top: 6px;
}

.markdown {
    /*overflow-wrap: break-word !important;*/
}

.markdown h1 {
    font-size: 2rem;
    line-height: 1;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.markdown h2 {
    font-size: 1.5rem;
    line-height: 2.25rem;
    margin-top: 1.75rem;
    margin-bottom: 1.5rem;
}

.markdown h3 {
    font-size: 1.0rem;
    line-height: 2.25rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.markdown hr {
    margin-top: 1.75rem;
}

.markdown ul {
    list-style-position: inside;
    list-style-type: disc;
    padding-left: 0; /* Removes default left padding */
    margin-left: 0; /* Removes extra left margin */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.markdown ol {
    list-style-position: inside;
    list-style-type: decimal;
    padding-left: 0; /* Removes default left padding */
    margin-left: 0; /* Removes extra left margin */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Markdown-specific list styles */
.markdown ol,
.markdown ul {
    padding-left: 1.5em;
    margin: 0.5em 0;
    /*overflow-wrap: break-word !important;*/
}

.markdown ol > li {
    /*overflow-wrap: break-word !important;*/
}

.markdown ol > li > p {
    /*overflow-wrap: break-word !important;*/
}

.markdown ol > li > p > strong {
    /*overflow-wrap: break-word !important;*/
}

/* Style for markdown list items */
.markdown li {
    margin-bottom: 0.5em;
    position: relative;  /* For positioning the bullet */
    padding-left: 1.0em;  /* Space for the bullet plus text indentation */
}

/* Reset default list-style to none and create custom bullet positioning */
.markdown ul {
    list-style: none;
}

/* Create custom bullet positioning */
.markdown ul > li:before {
    content: "•";  /* Unicode bullet */
    position: absolute;
    left: 0;
    /* Optionally adjust vertical alignment if needed */
    top: 0;
}

/* Numbered list items - keep default styling but adjust padding */
.markdown ol {
    list-style-position: outside;
}

/* Nested list adjustments */
.markdown li > ol,
.markdown li > ul {
    margin-top: 0.5em;
    margin-left: 0;  /* Remove default left margin since we're using padding */
}

.markdown ol > li,
.markdown ul > li {
    margin-left: 0.5em !important;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /*margin-bottom: 1rem;*/
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drop-zone.dragover {
    background: #e9ecef;
    border-color: #0d6efd;
    transform: scale(1.02);
}
.drop-zone .file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}
.drop-zone-content {
    pointer-events: none;
    z-index: 1;
}
.drop-zone-content p {
    margin: 0 0 1rem 0;
    font-size: 1.1em;
    color: #666;
}

#chat_input {
    background-color: var(--theme-base-100) !important;
    color: var(--theme-secondary-content) !important;
    box-shadow: none !important;
    border-color: var(--fallback-bc,oklch(var(--bc)/.2)) !important;
    outline-style: solid !important;
    outline-width: 2px !important;
    outline-offset: 2px !important;
    outline-color: var(--fallback-bc,oklch(var(--bc)/.2)) !important;
}

#chat_input:focus,#chat_input:active {
    border-color: var(--theme-base-400) !important;
    outline-color: var(--theme-base-400) !important;
}

#chat_input::placeholder {
    color: var(--theme-primary) !important;
}


/* detect autofill, required for passwords in registration */
@keyframes onAutoFillStart { from {} to {} }
@keyframes onAutoFillCancel { from {} to {} }

input:-webkit-autofill {
    animation-name: onAutoFillStart;
}

input:not(:-webkit-autofill) {
    animation-name: onAutoFillCancel;
}

.checkbox_sm {
    width: 1rem !important;
    height: 1rem !important;
}

.spin-1-second {
  -webkit-animation: fa-spin 1s infinite linear;
  animation: fa-spin 1s infinite linear;
}

/* Sidebar */
.sidebar-wrapper {
    position: relative;
    width: 392px; /* w-96 equivalent + 4px */
    transition: width 0.3s ease;
    height: 100%; /* Change from min-height: 100vh */
}

.sidebar-wrapper.collapsed {
    width: 32px; /* Width of the toggle button */
}

.sidebar-content {
    position: sticky; /* Add sticky positioning */
    top: 0; /* Stick to top */
    width: 100%;
    background: var(--bg-base-100, white);
    height: 100%;
    border-right: 1px solid var(--border-base-300, #e5e7eb);
    transition: transform 0.3s ease;
}

.sidebar-wrapper.collapsed .sidebar-content {
    transform: translateX(-100%);
}

.toggle-button {
    position: absolute;
    top: 0.5rem;
    right: -16px;
    z-index: 10;
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    background: var(--bg-base-100, white);
    border: 1px solid var(--border-base-300, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-wrapper.collapsed .toggle-button {
    transform: rotate(180deg);
    right: -32px;
}

.content-area {
    padding: 1rem;
    background: var(--bg-base-100, white);
    border-radius: 0.5rem;
    overflow-y: auto;
    height: 100%;
}

/* Artefact editing */

/*.artefact-edit-buttons {*/
/*    display: none;*/
/*    z-index: 100;*/
/*    position: absolute;*/
/*    cursor: pointer;*/
/*}*/


.context-buttons {
  display: none; /* Initially hidden */
  flex-direction: row;
  gap: 5px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.context-button {
  border: none;
  background: #f0f0f0;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
}
