.tabler-pencil {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4' /%3E%3Cpath d='M13.5 6.5l4 4' /%3E%3C/svg%3E");
}
.tabler-device-floppy {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2' /%3E%3Ccircle cx='12' cy='14' r='2' /%3E%3Cpolyline points='14 4 14 8 8 8 8 4' /%3E%3C/svg%3E");
}
.animate-spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.tabler-loader-2 {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 9 9' /%3E%3C/svg%3E");
}
#editor {
    position: relative;
    height: 550px;
    width: 100%;
    border: 1px solid #ddd;
    background-color: #272822;
}
.ace_editor, .ace_text-layer, .ace_content, .ace_gutter, .ace_line, .ace_gutter-cell {
    font-family: var(--ace-font, 'Fira Code', monospace) !important;
    font-size: var(--ace-size, 16px) !important;
    line-height: 1.5 !important;
}
.dropdown-submenu { position: relative; }
.dropdown-submenu .dropdown-menu { top: 0; left: 100%; margin-top: -1px; }
.dropdown-submenu:hover .dropdown-menu { display: block; }
#aiChatSidebar {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-left: 1px solid var(--bs-border-color);
}
#aiChatSidebar .offcanvas-header {
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}
#aiChatSidebar .offcanvas-body {
    background-color: var(--bs-body-bg) !important;
}
.chat-bubble.ai {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-bottom-left-radius: 0 !important;
}
.chat-bubble.user {
    background-color: var(--bs-primary) !important;
    color: #fff;
    border-bottom-right-radius: 0 !important;
}
#chatInput {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}
#chatInput:focus {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-primary);
    color: var(--bs-body-color);
    box-shadow: none;
}
.chat-bubble code {
    background: rgba(0,0,0,0.2);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}
.btn-link {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.btn-link:hover {
    opacity: 1;
}
.chat-bubble.ai {
    word-break: break-word;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.animate-pulse {
    animation: pulse 1s infinite;
}
.animate-spin {
    display: inline-block;
    animation: spin 2s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
#aiChatSidebar .offcanvas-body {
    background-color: #272822 !important; 
}
.chat-bubble.ai {
    background-color: #3e3d32 !important; 
    color: #f8f8f2;
    border: 1px solid #49483e;
}
.modal.fade.fixed-right .modal-dialog {
    position: fixed;
    margin: auto;
    width: 500px; 
    height: 100%;
    right: 0;
    top: 0;
    transform: translate3d(100%, 0, 0);
    transition: transform 0.3s ease-out;
}
.modal.show.fixed-right .modal-dialog {
    transform: translate3d(0, 0, 0);
}
.modal.fixed-right .modal-content {
    height: 100%;
    border-radius: 0;
    overflow-y: auto;
}
@media (max-width: 992px) {
    .modal.fixed-right .modal-dialog {
        width: 100%;
    }
}
#codePreview {
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
    white-space: pre; 
    word-wrap: normal;
}
#codePreview::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
#codePreview::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}
.response-section {
    min-height: 150px;
}
#notes-container.view-list .col-md-4 {
    width: 100% !important; 
}
#notes-container.view-list .card {
    flex-direction: row; 
    align-items: center;
    padding: 0 1rem;
}
#notes-container.view-list .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}
.view-list .col-md-4 {
    width: 100% !important;
    margin-bottom: 0.5rem;
}
.view-list .card {
    flex-direction: row !important;
    align-items: center;
    padding: 0.5rem 1rem;
}
.view-list .card-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0.5rem !important;
    gap: 15px;
}
.view-list .card-body > div:first-child {
    flex: 1; 
    display: flex;
    align-items: center;
    gap: 15px; 
    overflow: hidden;
}
.view-list p {
    display: none !important;
}
.view-list h6 {
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
.view-list .d-flex.justify-content-between {
    margin-top: 0 !important;
}
.view-list .card-body {
    flex-direction: row !important;
}
.view-list .mt-auto {
    margin-top: 0 !important;
}
.view-list .card-body.d-flex.flex-column {
    flex-direction: row !important;
}
.d-none-in-grid { display: none; }
.view-list .d-none-in-grid { display: block; }
.d-none-in-list { display: block; }
.view-list .d-none-in-list { display: none; }