/* theme.css */
:root {
    --light-dark-dir: 1; /* Light mode is "positive" */
    /* White HSL Components */
    --fg-h: 0;
    --fg-s: 0%;
    --fg-l: 100%; /* White is 100% Lightness */
    --foreground-color: hsl(var(--fg-h), var(--fg-s), var(--fg-l));
    --color-offset-1: -10%;
    --color-offset-2: -15%;
    --color-offset-3: -20%;
    --text-color: #000000;
    --error-text-color: #DC143C;
    --warning-text-color: #FF964F;
    --disabled-text-color: #bfbfbf;
    --disabled-accent-color: #bfbfbf;
    --disabled-accent-text-color: #e5e5e5;
    --bg-color: #E3E9EE;
    --bg-color-darker: #CED3D7;
    --bg-color-more-darker: #B9BEC3;
    --bg-color-darkest: #a8a8a8;
    --surface-color: #fff;
    --primary-color: rgb(37, 91, 246);
    --primary-text-color: #ffffff;
    --secondary-color: rgb(89, 195, 249);
    --secondary-text-color: #ffffff;
    --disabled-color: #bfbfbf;
    --topbar-bg-color: #fff;
    --toolbar-bg-color: #fff;
    --filename-pill-bg-color: #B2D2FC;
    --toolbar-hover-color: rgba(227,233,238,0.5);
    --subpane-bg-color: rgba(227,233,238,0.5);
    --toolbar-secondary-hover-color: rgba(255,255,255,.2);
    --border-color: rgba(0,0,0,0.1);
    --border-focused-color: rgba(0,0,0,0.3);
    --border-secondary-color: rgba(255,255,255,0.5);
    --input-border-color: rgba(0,0,0,0.1);
    --input-disabled-color: rgba(227,233,238,0.5);
    --shadow-color: rgba(0,0,0,0.1);
    --modal-overlay-color: rgba(0,0,0,0.5);
    --primary-button-color: #00CE86;
    --primary-button-hover-color: #00AC6E;
    --secondary-button-color: #007bff;
    --secondary-button-hover-color: #005FCE;
}

[data-theme="dark"] {
    --light-dark-dir: -1; /* Flips the math direction */
    --fg-l: 15%; /* Dark base for the "foreground" */
}

html, body, #app, .page, .main-container {
    height: 100%;
}

body {
    margin: 0;
    font-family: sans-serif;
    
}

.brand-bar {
    display: flex;
    align-content: center;
    justify-content: left;
    align-content: center;
    gap: 12px;
    height: 42px;
    padding: 4px 16px;
    background-color: var(--primary-color);
}

.app-title {
    font-size: 16px;
    color: var(--primary-text-color);
    align-self: center;
    font-weight: 600;
}

.brand-separator {
    font-size: 16px;
    color: var(--primary-text-color);
    align-self: center;
    font-weight: 600;
}

.brand-logo-hl {
    height: 40px;
}

.no-results-msg {
    font-size: 12px;
    color: var(--text-color);
}

.loading-msg {
    font-size: 12px;
    color: var(--text-color);
}

.button-icon-spacer {
    margin-right: 4px;
}

.button-secondary {
    padding: 4px 8px;
    background-color: var(--secondary-button-color);
    color: var(--primary-text-color);
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    
}

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

    .button-secondary:disabled {
        background-color: var(--disabled-accent-color);
        color: var(--disabled-accent-text-color);
    }

.button-primary {
    padding: 4px 8px;
    background-color: var(--primary-button-color);
    color: var(--primary-text-color);
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
}

    .button-primary:hover {
        background-color: var(--primary-button-hover-color);
    }

.button-primary:disabled {
    background-color: var(--disabled-accent-color);
    color: var(--disabled-accent-text-color);
}

.button-tertiary {
    padding: 4px 8px;
    background-color: none;
    background: none;
    color: var(--text-color);
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    
}

    .button-tertiary:hover {
        background-color: none;
        text-decoration: underline;
    }

.button-tertiary:disabled {
    color: var(--disabled-text-color);
}



.input-label {
    font-size: 11px;
    color: var(--text-color);
}

.input-field {
    border: none;
    width: 100%;
    padding: 4px 6px;
    background-color: var(--foreground-color);
    border-bottom: 2px solid var(--border-color);
    transition: border ease-in-out .2s;
    font-size: 11px;
    color: var(--text-color);
    box-sizing: border-box;
}

    .input-field:focus {
        outline: none;
        border-bottom: 2px solid hsl( var(--fg-h), var(--fg-s), calc(var(--fg-l) - (var(--light-dark-dir) * 75%)) );
    }

.whats-new h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.whats-new h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.whats-new p {
    font-size: 16px;
    margin-bottom: 12px;
}

.whats-new-ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.whats-new-li {
    display: flex;
    gap: 16px;
    padding: 8px;
    justify-content: left;
    align-items: center;
    background-color: hsl( var(--fg-h), var(--fg-s), calc(var(--fg-l) + var(--color-offset-1)) );
    border-radius: 8px;
    border: 1px solid hsl( var(--fg-h), var(--fg-s), calc(var(--fg-l) + var(--color-offset-2)) );
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 13px;
}

.whats-new-li span {
    margin-right: 6px;
    font-size: 18px;
}
  

























.modal-upload-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 20px;
    box-sizing: border-box;
    background: var(--surface-color);
    color: var(--text-color);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px var(--shadow-color);
}

    .modal-upload-input:focus {
        outline: none;
        box-shadow: 0 0 0 3px var(--shadow-color);
    }

    .modal-upload-input::placeholder {
        color: var(--bg-color);
    }

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

    .modal-buttons .btn {
        padding: 8px 16px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
    }

        .modal-buttons .btn.primary {
            background: #007bff;
            color: white;
        }

            .modal-buttons .btn.primary:hover {
                background: #0056b3;
            }

        .modal-buttons .btn.secondary {
            background: #6c757d;
            color: white;
        }

            .modal-buttons .btn.secondary:hover {
                background: #545b62;
            }

        .modal-buttons .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }



/* Disclaimer Modal */
.disclaimer-modal {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.disclaimer-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.disclaimer-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  flex-shrink: 0;
}

.disclaimer-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: black;
}

.disclaimer-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.disclaimer-text {
  margin-bottom: 30px;
  line-height: 1.6;
  flex: 1;
}

.disclaimer-text p {
  margin-bottom: 16px;
  color: #333;
}

.disclaimer-text ul {
  margin: 16px 0;
  padding-left: 20px;
}

.disclaimer-text li {
  margin-bottom: 12px;
  color: #555;
}

.disclaimer-text strong {
  color: #d32f2f;
}

.disclaimer-buttons {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  flex-shrink: 0;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  margin-top: 20px;
}

.disclaimer-btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 160px;
}

.disclaimer-btn.primary {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: 2px solid #28a745;
  color: white;
}

.disclaimer-btn.primary:hover {
  background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
  border-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.disclaimer-btn.secondary {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  color: #6c757d;
}

.disclaimer-btn.secondary:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}





/* Main page styles removed - app now starts directly in canvas mode */

.refresh-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
    padding: 0 20px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}


#mainContentColumn {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 45px); /* 45px = top bar */
    min-height: 0;
    width: 100%;
}


#canvasContainer {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    width: 100%;
}

.control-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Grid Overlay Styles */
.grid-overlay {
    position: absolute;
    border: 2px dashed #666;
    cursor: move;
    transition: border-color 0.2s, border-style 0.2s;
    background: rgba(255, 255, 255, 0.05);
    
    
}

    .grid-overlay:hover {
        border-color: #007bff;
        
        background: rgba(0, 123, 255, 0.02);
       
    }

    .grid-overlay.active {
        border-color: #007bff;
        border-style: solid;
        
        background: rgba(0, 123, 255, 0.05);
    
    }

.grid-content {
    width: 100%;
    height: 100%;
    position: relative;
 
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #007bff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.grid-overlay:hover .resize-handle {
    opacity: 1;
}

.grid-overlay.active .resize-handle {
    opacity: 1;
}

.resize-handle-nw {
    top: -9px;
    left: -9px;
    cursor: nw-resize;
}

.resize-handle-ne {
    top: -9px;
    right: -9px;
    cursor: ne-resize;
}

.resize-handle-sw {
    bottom: -9px;
    left: -9px;
    cursor: sw-resize;
}

.resize-handle-se {
    bottom: -9px;
    right: -9px;
    cursor: se-resize;
}

.resize-handle:hover {
    background: #007bff;
    transform: scale(1.2);
}

/* Center edge handles */
.resize-handle-n {
    position: absolute;
    top: -9px; /* or adjust as needed for your handle size */
    left: calc(50% - 9px);
    cursor: n-resize;
}

.resize-handle-s {
    position: absolute;
    bottom: -9px;
    left: calc(50% - 9px);
    cursor: s-resize;
}

.resize-handle-w {
    position: absolute;
    left: -9px;
    top: calc(50% - 9px);
    cursor: w-resize;
}

.resize-handle-e {
    position: absolute;
    right: -9px;
    top: calc(50% - 9px);
    cursor: e-resize;
}


@keyframes checkbox-check {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.slide-management {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

#slideNavigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Slide indicator inside canvas - REMOVED */

#slideIndicator {
    font-weight: 600;
    color: #007bff;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

#prevSlideBtn, #nextSlideBtn {
    padding: 6px 12px;
    font-size: 14px;
}

.grid-container {
    position: absolute;
    border: 2px dashed rgba(0, 123, 255, 0.8);
    cursor: move;
    background: rgba(255, 255, 255, 0.2);
    min-width: 100px;
    min-height: 100px;
    user-select: none;
    z-index: 1;
    /* Ensure it's visible by default */
    width: 400px;
    height: 300px;
    left: 50px;
    top: 50px;
}

.grid-highlight {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.row-highlight {
    background: rgba(0, 123, 255, 0.05);
    width: 100%;
    border: 1px dashed rgba(0, 123, 255, 0.3);
}

.col-highlight {
    background: rgba(255, 123, 0, 0.05);
    height: 100%;
    border: 1px dashed rgba(255, 123, 0, 0.3);
}

.gap-highlight {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.row-gap-highlight {
    background: rgba(76, 175, 80, 0.2);
    width: 100%;
    border: 1px dashed rgba(76, 175, 80, 0.5);
}

.col-gap-highlight {
    background: rgba(156, 39, 176, 0.2);
    height: 100%;
    border: 1px dashed rgba(156, 39, 176, 0.5);
}

.resize-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #007bff;
    border-radius: 50%;
    z-index: 3;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.resize-handle:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #0056b3;
}

.handle-nw { top: -5px; left: -5px; cursor: nw-resize; }
.handle-ne { top: -5px; right: -5px; cursor: ne-resize; }
.handle-sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.handle-se { bottom: -5px; right: -5px; cursor: se-resize; }

.grid-highlight, .gap-highlight {
    position: absolute;
    pointer-events: none;
}

/* Logo grid container styles removed - not needed in direct canvas mode */

.canvas-button-row {
    padding: 20px 20px 0 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.canvas-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 12px;
}

.canvas-btn:last-child {
    margin-bottom: 0;
}

/* Exit Canvas button - dark maroon color */
#backBtn.btn.secondary {
    background: linear-gradient(135deg, #800020 0%, #660019 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(128, 0, 32, 0.3);
}

#backBtn.btn.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #660019 0%, #4d0013 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(128, 0, 32, 0.4);
}

/* Refresh button when used in canvas - override default styling */
#refreshBtnCanvas.refresh-btn.canvas-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

#refreshBtnCanvas.refresh-btn.canvas-btn:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#refreshBtnCanvas.refresh-btn.canvas-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.selection-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.selection-controls-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.selection-controls-row #listDropdown {
    flex: 1;
    min-width: 0;
}

.selection-controls-row #saveSelectionBtn {
    flex-shrink: 0;
}

.selection-controls-link {
    display: flex;
    justify-content: flex-start;
}

.link-separator {
    font-size: 11px;
    color: #ccc;
    margin: 0 8px;
}

.export-list-link {
    font-size: 11px;
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.export-list-link:hover {
    color: #007bff;
    text-decoration: underline;
}



.sort-controls {
    display: flex;
    gap: 4px;
    margin: 8px 0 0 0;
    justify-content: flex-end;
}

.sort-controls-under-search {
    margin-top: 8px;
    margin-bottom: 0;
    justify-content: flex-end;
}

.sort-btn {
    padding: 0 10px;
    height: 32px;
    border: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sort-btn:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.sort-btn.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}





/* Save/Load section styles */
.save-load-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.save-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.save-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    text-align: left;
}

.save-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    color: white;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn.secondary:disabled {
    background: #6c757d;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.saved-selections {
    max-height: 150px;
    overflow-y: auto;
}

.saved-selection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.saved-selection-item:hover {
    background: #e9ecef;
}

.saved-selection-info {
    flex: 1;
    cursor: pointer;
}

.saved-selection-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.saved-selection-count {
    font-size: 12px;
    color: #666;
}

.saved-selection-actions {
    display: flex;
    gap: 4px;
}

.saved-selection-load {
    background: #28a745;
    border: 1px solid #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.saved-selection-load:hover {
    background: #218838;
    border-color: #218838;
}

.saved-selection-delete {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.saved-selection-delete:hover {
    background: #c82333;
    border-color: #c82333;
}

.saved-selections-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    font-size: 13px;
}

/* List Manager Modal specific styles */
.list-manager-modal {
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
}

.list-manager-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.current-selection-section,
.saved-lists-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.current-selection-section h4,
.saved-lists-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.current-selection-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.saved-lists-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    /* Ensure smooth scrolling and visible scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.saved-lists-container::-webkit-scrollbar {
    width: 6px;
}

.saved-lists-container::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.saved-lists-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.saved-lists-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.saved-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.saved-list-item:last-child {
    border-bottom: none;
}

.saved-list-item:hover {
    background-color: #f5f5f5;
}

.saved-list-info {
    flex: 1;
    cursor: pointer;
}

.saved-list-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.saved-list-meta {
    font-size: 12px;
    color: #666;
}

.saved-list-actions {
    display: flex;
    gap: 8px;
}

.saved-list-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.saved-list-load {
    background: #007bff;
    color: white;
}

.saved-list-load:hover {
    background: #0056b3;
}

.saved-list-delete {
    background: #dc3545;
    color: white;
}

.saved-list-delete:hover {
    background: #c82333;
}

.saved-lists-empty {
    text-align: center;
    color: #666;
    padding: 30px;
    font-style: italic;
}

.saved-list-item.currently-loaded {
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
}

.saved-list-item.currently-loaded .saved-list-name {
    color: #007bff;
    font-weight: 600;
}

/* Update button styles for better consistency */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn.primary {
    background: #007bff;
    color: white;
}

.btn.primary:hover:not(:disabled) {
    background: #0056b3;
}

.btn.secondary {
    background: #6c757d;
    color: white;
}

.btn.secondary:hover:not(:disabled) {
    background: #545b62;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



/* Save options modal styles */
.save-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.save-option {
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
}

.save-option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.save-option-btn {
    width: 100%;
    margin-bottom: 8px;
}

.save-option-description {
    margin: 0;
    font-size: 14px;
    color: #666;
}



/* Disclaimer Modal */
.disclaimer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.disclaimer-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 6px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.disclaimer-header {
    color: black;
    padding: 10px;
    flex-shrink: 0;
    background-color: #fff;
    width: 100%;
    height: 50px;
    border-bottom: #E6E6E6 1px solid;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 16px;
    display: flex;
    align-items: center; /* Vertical centering */
}

    .disclaimer-title, .disclaimer-header h2 {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 18px;
        font-weight: 600;
        margin: 0;
        text-align: left;
        justify-content: flex-start;
        width: 100%;
    }

.disclaimer-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1 1 auto;
    background: white;
    max-height: 300px; /* or another value that fits your modal */
}

    .disclaimer-body h1 {
        margin-bottom: 16px;
        color: #0066FB;
        font-weight: 600;
        font-size: 14px;
    }

    .disclaimer-body p {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .disclaimer-body ul {
        margin-bottom: 16px;
        font-size: 12px;
    }

    .disclaimer-body li {
        margin-bottom: 16px;
    }


.disclaimer-footer {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    flex-shrink: 0;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: white;
    border-radius: 0 0 12px 12px;
}

#disclaimerAccept {
}



.disclaimer-buttons {
}

.disclaimer-btn {
    all: unset; /* Resets all inherited styles */
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
    border: 3px solid;
    padding: 0.25em 0.5em;
    box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    background-color: #FFF;
}

    .disclaimer-btn.primary {
        all: unset; /* Resets all inherited styles */
        font-family: "Open Sans", sans-serif;
        font-size: 12px;
        letter-spacing: 2px;
        text-decoration: none;
        text-transform: uppercase;
        color: #000;
        cursor: pointer;
        border: 3px solid;
        padding: 0.25em 0.5em;
        box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
        position: relative;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        background-color: #FFF;
    }

        .disclaimer-btn.primary:hover {
            all: unset; /* Resets all inherited styles */
            font-family: "Open Sans", sans-serif;
            font-size: 12px;
            letter-spacing: 2px;
            text-decoration: none;
            text-transform: uppercase;
            color: #000;
            cursor: pointer;
            border: 3px solid;
            padding: 0.25em 0.5em;
            box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
            position: relative;
            user-select: none;
            -webkit-user-select: none;
            touch-action: manipulation;
            background-color: #FFF;
        }

        .disclaimer-btn.primary:active {
            box-shadow: 0px 0px 0px 0px;
            top: 5px;
            left: 5px;
        }

    .disclaimer-btn.secondary {
        all: unset; /* Resets all inherited styles */
        font-family: "Open Sans", sans-serif;
        font-size: 12px;
        letter-spacing: 2px;
        text-decoration: none;
        text-transform: uppercase;
        color: #000;
        cursor: pointer;
        border: 3px solid;
        padding: 0.25em 0.5em;
        box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
        position: relative;
        user-select: none;
        -webkit-user-select: none;
        touch-action: manipulation;
        background-color: #FFF;
    }

}

.disclaimer-btn.secondary:hover {
    all: unset; /* Resets all inherited styles */
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
    border: 3px solid;
    padding: 0.25em 0.5em;
    box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    background-color: #FFF;
}

.disclaimer-btn.secondary:active {
    box-shadow: 0px 0px 0px 0px;
    top: 5px;
    left: 5px;
}

/* Rectangle is default, so no extra styling needed */
.shape-oval {
    border-radius: 50%;
}

.shape-diamond {
    transform: rotate(45deg);
    border-radius: 0;
}




/* Pagination controls removed - not needed in direct canvas mode */

/* wwwroot/css/app.css or a component-specific CSS file */

.topbar {
    position: relative;
    z-index: 10000000 !important;
}

.user-icon-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user-popover {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 1rem;
    z-index: 100000000;
    border-radius: 6px;
}