/* menu.css === Styles for New Dynamic Menu === */

/* --- Main Sidebar Container --- */
#sidebar {
	z-index: 500;
	position: fixed;
	top: 0;
	left: 0;
	width: 97vw;
	height: 100vh;
	background-color: #1c64b6;
	color: #fff;
	max-width:600px;
	transition: transform 0.3s ease-in-out;
}
/* Container holds the relative position so the absolute dropdown anchors to it */
.custom-multi-filter-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 10px;
    
    /* NEW: Prevents the container from stretching in flex layouts */
    height: max-content; 
    vertical-align: top;
}
/* Make the button look like a standard select box */
.custom-multi-filter-btn {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px; /* Prevents iOS zoom */
    cursor: pointer;
}

/* The floating popup panel */
.custom-multi-filter-dropdown {
    position: absolute;
    /* NEW: Use calc to ensure it sits exactly 5px below the button */
    top: calc(100% + 5px); 
    
    /* NEW: If the button is on the RIGHT side of the screen, use right: 0 instead of left: 0 */
    /* This forces the menu to drop down and expand to the left, staying on screen */
    right: 0; 
    left: auto; 
    
    min-width: 250px;
    
    /* NEW: Ensures it doesn't become wider than a mobile phone screen */
    max-width: 90vw; 
    
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    
    /* NEW: Bumped z-index extremely high so nothing overlaps it */
    z-index: 9999; 
    
    /* NEW: Use viewport height (vh) so it always fits perfectly on mobile screens */
    max-height: 70vh; 
    
    overflow-y: auto; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: black;
}

@media (max-width: 768px) {
    .custom-multi-filter-dropdown {
        position: fixed; /* Detaches from the button, anchors to the screen */
        
        /* Adjust this 60px to exactly match the height of your top menu/header */
        top: 60px; 
        
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw; /* Overrides the previous 90vw */
        
        max-height: 70vh; /* As requested */
        
        /* Make it look like a seamless drawer dropping from the top */
        border-radius: 0 0 15px 15px; 
        border-left: none;
        border-right: none;
        border-top: 1px solid #ccc;
        
        /* Add a bigger shadow since it's a massive panel now */
        box-shadow: 0 15px 25px rgba(0,0,0,0.2);
        
        /* Extremely high z-index to ensure it sits over everything */
        z-index: 99999; 
        margin-top: 0;
    }
    
    /* Optional: Make the checkbox rows slightly taller for easier tapping on full screen */
    .filter-opt {
        padding: 16px 15px;
        font-size: 18px;
    }
}

/* The individual checkbox rows */
.filter-opt {
    display: block;
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    background-color: #fafafa;
}

.filter-opt:last-child {
    border-bottom: none;
}

.filter-opt input {
    margin-right: 12px;
    transform: scale(1.3); /* Make checkboxes easier to tap on mobile */
}


#settings-panel-overlay select {
    max-width: 59%;
}
#sidebar.sidebar-hidden {
  transform: translateX(-300%);
}
#sidebar.active {
	transform: translateX(0);
	}

/* --- Menu Overlay --- */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 490;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

button#sort-toggle-btn {
    border: none;
    width: 1rem;
    border-radius: 0rem;
    margin: 0px .5rem;
	box-shadow:unset;
    
   
}

i.icofont-simple-up.date::after {
    content: "\ec45";
    display: flex;
}
i.icofont-simple-down.date::after {
    content: "\ec45";
    display: flex;
}



i.icofont-simple-down.alpha::after {
    content: "\ebe6";
    display: flex;
}
i.icofont-simple-up.alpha::after {
    content: "\ebe6";
    display: flex;
}
#menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Redesigned Top Panels --- */
.menu-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem 0rem 3rem;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}
.menu-logo {
    height: 40px;
    max-width: 120px;
}
.user-info {
    font-size: 0.8rem;
    color: #fff;
    text-align: right;
    display: flex;
    width: 100%;
    justify-content: space-around;
}
.user-info span {
    display: block;
}

i.icofont-cloud-upload.status-unsynced {
    color: #c07c00;
}

i.icofont-cloud.status-synced {
    color: #1c64b6;
}
.menu-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}
.menu-shortcuts {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

#add-new-entry-btn,
.shortcut-btn,
#sort-toggle-btn,
.config-toggle-btn {
    background: none;
    border: .1rem solid #818181;
    color: #fff;
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    min-width: unset;
    width: 3rem;
    height: 3rem;
	flex-shrink: 0;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.2s, color 0.2s;
}

#add-new-entry-btn:hover, .shortcut-btn:hover, .config-toggle-btn:hover, #sort-toggle-btn:hover {
    background: #e9ecef;
    color: #00003c;
}

.shortcut-btn.active {
    color: #fff;
    background-color: #00003c;
	border-color: #164c89;
}


/* --- Config Panel --- */
#config-panel {
    position: absolute;
    top: 134px; 
    left: 0;
    right: 0;
    z-index: 10;
    transform: translateY(-250%);
    transition: transform 0.3s ease-in-out;
    background:#f8f9fa;
    color: #333;
}
#config-panel.open {
    transform: translateY(0);
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
	height: 80vh;
    overflow-y: auto;
}

.config-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 8px;
    padding-left: 12px;
    color: #333;
}
.config-item.active {
    box-shadow: inset 4px 0 0 #007bff;
    font-weight: bold;
}
.config-item-name {
    flex-grow: 1;
    padding: 12px 0;
    cursor: pointer;
}
.config-item-actions { display: flex; }
.config-item-actions button {
    background: none; border: none; border-left: 1px solid #e9ecef;
    width: 44px; height: 44px; cursor: pointer; color: #6c757d;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.config-item-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
i#settings-close-btn {
    position: absolute;
    font-size: 1.5rem;
    background: #fff;
    padding: .2rem;
    border: .2rem solid #8a8a8a;
    border-radius: 3rem;
}
.delete-btn:hover { color: #dc3545; }
.config-panel-footer { margin-top: 8px; }
.new-view-btn {
    width: 100%;
    padding: 10px;
    background: #001ed2;
    border: 1px dashed #6c757d;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

/* --- Main Menu Content --- */
#menu-content {
    
    overflow-y: auto;
    flex-grow: 1;
	background:#fff;
    height: 75vh;
}
.menu-item.menu-folder {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
	align-items: center;
}
.menu-item, .menu-back-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: .5rem .7rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}
.menu-item:hover, .menu-back-btn:hover { background-color: #f8f9fa; }

.menu-item .count {
    background-color: #e9ecef; color: #6c757d;
    padding: 2px 8px; border-radius: 12px; font-size: 0.8rem;
}
.menu-back-btn {
    color: #007bff; gap: 8px; flex-direction: row;
    align-items: center; justify-content: flex-start; font-weight: 500;
    border-bottom: 2px solid #007bff;
}

.menu-item:nth-child(odd) {
    background: #f9f9f9;
}
.menu-controls-container {
    display: flex;
    background: #1c64b6;
    padding: .2rem;
    justify-content: end;
}

.menu-item span.detail-type {
    font-size: 1rem;
    color: #6c757d;
}
button#add-folder-permanent-btn {
    margin: unset;
    padding:.4rem .2rem;
}

/* --- Record & Folder Item Styles --- 
.record-details, .record-title, .menu-item-main {
    width: 100%;
}*/
.record-title .s_peri { font-weight: 500; }
.record-details {
    flex-direction: row;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
}

.menu-item.menu-record {
	display:grid;
    grid-template-areas: "title actions" "detail actions";
    gap: 0 .5rem;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}
.menu-item.menu-record.active {
	background:#113c6d;
	color:#fff;
	
}

.menu-item.menu-record.active .record-details{
	color:#d9dbde;
}

.menu-item-main{grid-area: title;}
.record-details {grid-area: detail;}
.record-title {grid-area: title;}
.record-actions {grid-area: actions;}
.folder-actions {grid-area: actions;}

/* --- Modals --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 3000; display: flex;
    justify-content: center; align-items: flex-start; padding-top: 5vh;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: .7rem;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #333;
	max-height: 82vh;
}
.modal-content.settings-panel {
    overflow: auto;
}
.modal-content h3 { margin: 0; text-align: center; }

/* --- DEFINITIVE FIX: iOS Input Fix & General Input Styles for Modals --- */
.modal-content input[type="text"],
.modal-content input[type="date"],
.modal-content select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    /*height: 44px;*/
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem; /* Prevents iOS auto-zoom */
    background-color: #f9f9f9;
}
input[type="radio"] {
    height: unset;
}
.modal-content select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
}

.input-group { display: flex; gap: 8px; }
.input-group input { flex-grow: 1; }
.input-group button { flex-shrink: 0; padding: 0 16px; height: 44px; }

.editor-list-container {
     border: 1px solid #e9ecef; border-radius: 8px; padding: 8px;
     max-height: 150px; overflow-y: auto;
}
.editor-list-container h4 { margin: 0 0 8px 4px; font-size: 0.9rem; color: #6c757d; }
.editor-level-item {
    display: flex; align-items: center; background: #f8f9fa;
    border-radius: 4px; padding: 4px 8px; margin-bottom: 4px; text-transform: capitalize;
}
.editor-level-item span { flex-grow: 1; }
.editor-level-item button {
     border: none; border-radius: 50%; width: 24px; height: 24px;
     cursor: pointer; margin-left: 4px; display: flex;
     align-items: center; justify-content: center; font-size: 1rem;
}
.add-level-btn, .remove-level-btn {min-width: unset;}
.editor-level-item button i { font-size: 14px; }
.add-level-btn { background: #007bff; color: white; }
.remove-level-btn { background: #dc3545; color: white;}
.level-reorder-btns { display: flex; gap: 4px; }
.level-reorder-btns button { background: #e9ecef; color: #6c757d; border-radius: 4px; }
.level-reorder-btns button:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-footer { display: flex; gap: 12px; margin-top: 1rem;overflow:auto; }
.modal-footer button {
    flex-grow: 1; padding: 12px; border-radius: 8px; height: 44px;
    border: none; font-size: 1rem; cursor: pointer;
}
.save-btn { background-color: #1c64b6; color: white; }
.canc el-btn { background-color: #6c757d; color: white; }

/* Icon Picker */
#icon-picker-modal .modal-content { height: 70vh; }
#icon-picker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px; overflow-y: auto; padding: 8px;
    border: 1px solid #e9ecef; border-radius: 8px; flex-grow: 1;
}
.icon-picker-item {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px; cursor: pointer;
    padding: 8px; border-radius: 8px;
}
.icon-picker-item:hover { background: #e9ecef; }
.icon-picker-item i { font-size: 32px; color: #6c757d; }
.icon-picker-item span { font-size: 10px; color: #6c757d; }

/* "Add New Item" Popup Specifics */
#floattext .modal-content {
    gap: 0.8rem;
}
#floattext input, #floattext select {
    /* height: 2.5rem;; Ensure consistency */
}
.location-input-group {
    display: flex;
    gap: 8px;
}
.location-input-group button {
    width: 44px;
    height: 2.5rem;
    flex-shrink: 0;
    padding: 0;
    min-width: unset;
}
/* Let the select2 widget consume the remaining space next to the
   "+ folder" button instead of overflowing or pushing it off. */
.location-input-group > .select2-container {
    flex: 1 1 auto;
    min-width: 0;
}
button#add-folder-btn {
    width: max-content;
    padding: 0rem .4rem;
}

h4 {
    margin:  0.4rem .1rem ;
    padding: 0.7rem .4rem 0.7rem .4rem;
    border-bottom:7px solid gray;
}




#right-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 90vw;
    max-width: 400px;
    height: 100vh;
    background-color: #f8f9fa; /* Lighter background for distinction */
    color: #333;
    z-index: 600;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: -3px 0 15px rgba(0,0,0,0.1);
}

#terminal-body div {
	display: flex;
    flex-wrap: wrap;
    border-top: 1px dashed green;
}


#right-sidebar.sidebar-hidden-right {
    transform: translateX(100%);
}

#right-sidebar.active {
    transform: translateX(0);
}
i#menu-top {
        z-index: 2;
}
#right-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 590;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#right-menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#right-menu-overlay .right-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(360px, 92vw);
    background: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}
#right-menu-overlay.visible .right-menu-content {
    transform: translateX(0);
}

#right-menu-overlay .right-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa;
}
#right-menu-overlay .right-menu-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #00003c;
}
#right-menu-overlay .right-menu-header .close-btn {
    cursor: pointer;
    font-size: 1.4rem;
    color: #6c757d;
    padding: 4px 8px;
}
#right-menu-overlay .right-menu-header .close-btn:hover {
    color: #000;
}

#right-menu-overlay .right-menu-body {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    background: #fff;
}

#right-sidebar .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

#right-sidebar .menu-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #00003c;
}

#right-sidebar #right-menu-close-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
    color: #6c757d;
    background: #f1f3f5;
    border: none;
}

#right-sidebar #right-menu-content {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    background: #fff;
}

.menu-action-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: .5rem 0.7rem;
    margin-bottom: 0.75rem;
    text-align: left;
   
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
 
}

.menu-action-btn i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #113c6d;
    width: 2rem;
    text-align: center;
}
.menu-action-btn[data-action="download-report"] i {
    color: #1c64b6;
}

.menu-action-btn:hover i{
	color: #fff;
} 

.menu-action-item .left {
    grid-area: left;
    padding: 0.5rem;
}
.menu-action-item .middle{
	grid-area:middle;
	font-size:.9rem;
}
.menu-action-item .end{
	grid-area:end;
	padding: 0.5rem;
}
.icofont-close.end{
	background:orange;
}
.menu-action-item {
    display: grid;
	
    grid-template-areas:
        "left middle middle end";
        grid-template-columns:auto 1fr auto;
	gap:.5rem;
    margin-bottom: 0.75rem;
    background-color: #ffffff;
    border: 2px solid #113c6d;
    border-radius: 8px;
    color: #113c6d;
	align-items: center;
	overflow:hidden;
}
.menu-action-item.linked-record-item.active-record {
	background:#113c6d;
	color:#fff;
	
}

.menu-action-item.synced i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #28a745;
}


.menu-info-text {
    color: #6c757d;
    text-align: center;
    padding: 2rem 1rem;
}
.btn-div {
    display: flex;
    justify-content: space-around;
}

.btn-div button {
    width: auto;
}
.btn-div i {
   margin:unset;
}


/* --- camera style --- */
#camera-overlay {
	position: fixed; top: 0; left: 0; width: 100%; height: 100%;
	background-color: #000; z-index: 2000;
	display: flex; flex-direction: column;
}
#camera-video {
	width: 100%; flex-grow: 1; object-fit: cover;
	cursor: pointer;
}
#camera-controls-bar {
	position: absolute; top: 0; left: 0; width: 100%;
	padding: 10px; background: rgba(0,0,0,0.3);
	display: flex; justify-content: space-between; align-items: center;
}
.camera-info-display {
	color: white;
	font-size: 0.8rem;
	background: rgba(0,0,0,0.5);
	padding: 4px 8px;
	border-radius: 4px;
	font-family: monospace;
}
#camera-select {
	background-color: #333; color: white; border: 1px solid #555;
	padding: 8px; border-radius: 5px; max-width: 60%;
}
#camera-close-btn {
	font-size: 2rem; color: white; cursor: pointer;
	padding: 5px;
}
#camera-thumbnail-bar {
	flex-shrink: 0; width: 100%; height: 90px;
	background: rgba(0,0,0,0.5); padding: 5px;
	box-sizing: border-box; display: flex; gap: 5px;
	overflow-x: auto;
}
.camera-thumbnail { height: 100%; border-radius: 5px; border: 2px solid #fff; }
#camera-preview-overlay {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%;
	background: rgba(0,0,0,0.85);
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 15px;
}
#camera-preview-img { max-width: 80%; max-height: 60%; border-radius: 8px; border: 2px solid #fff; }
#camera-description-input { width: 80%; padding: 12px; border-radius: 5px; border: 1px solid #ccc; font-size: 1rem; }
.camera-preview-btn { padding: 10px 20px; border-radius: 5px; border: none; font-size: 1rem; cursor: pointer; }
#camera-save-btn { background-color: #4CAF50; color: white; }
#camera-cancel-btn { background-color: #f44336; color: white; }
			
			
			
@media screen and (max-width: 800px) {
	.menu-item.menu-record {
        grid-template-areas: "title actions" "detail actions";
	}
	.menu-info-header {
		flex-direction: column;
	}
}
/* --- Doodle Editor Styles --- */
.floatslide-image-wrapper.edit {
    cursor: crosshair;
}
/* --- Styling για το Modal Προεπισκόπησης Εικόνας (Floatslide) --- */
div#floatslide_modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 98vw;
    height: 98vh;
    z-index: 2050;
    background: rgba(28, 100, 182, 0.95);
	display: flex;
    justify-content: center;
    align-items: center;
    /*padding: 10px;*/
    flex-direction: column;
}



.floatslide-image-wrapper {
    /* 1. Use Grid instead of Flexbox for proper layering */
    display: grid; 
    place-items: center;

    position: relative;
   /* max-width: calc(100% - 120px);
    max-height: calc(100% - 80px); */
    overflow: hidden;
    width: 100%;
}

.floatslide-image-wrapper.panning {
    cursor: grabbing;
}

.floatslide-modal-image, {
    /* 2. This is the magic: It stacks both items in the exact same grid cell
    grid-area: 1 / 1;  */

    /* These rules ensure both elements scale identically within the cell */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;

    /* Your existing transform rules */
    transform-origin: 0 0;
    transition: transform 0.2s ease-out;
}




/* --- UPDATED IMAGE SIZING --- */

.floatslide-modal-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* This is the key change */
}



.floatslide-modal-fileinfo {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
}
.floatslide-download-link {
    display: inline-block;
    margin-top: 1em;
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

/* --- UPDATED NAVIGATION BUTTONS --- */
.floatslide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 20;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    background: none;
    border: none;
    padding: 10px;
    width: auto;
    height: auto;
    box-shadow: none;
    border-radius: 50%;
}
.floatslide-nav:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    background: rgba(0, 0, 0, 0.2);
}



.floatslide-actions-container {
    position: absolute;
    top: 58px;
    right: 45px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    z-index: 20;
}
.floatslide-action {
    background: rgba(245, 245, 245, 0.7);
    color: #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.floatslide-action:hover {
    background: rgba(220, 220, 220, 0.9);
}



/* --- Styling for the Image Editor (Doodle) --- */



/* Color Picker Button and Palette */
.doodle-color-picker {
    position: relative; /* For positioning the absolute palette */
}

.doodle-color-display {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

.doodle-color-palette {
    position: absolute;
    bottom: calc(100% + -1rem); /* Position above the toolbar */
    left: -3rem;
    transform: translateX(-50%);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 8px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
}

.doodle-color-palette.visible {
    visibility: visible;
    opacity: 1;
}

.doodle-color-palette .doodle-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #eee;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.doodle-color-palette .doodle-color:hover {
    transform: scale(1.1);
}


.doodle-toolbar button {
    padding: 8px 12px;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    border-radius: 6px;
}

.doodle-toolbar button i {
    margin-right: 5px;
}

.doodle-canvas, .doodle-preview-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows clicks to pass through to the wrapper */
}
.doodle-preview-canvas {
    z-index: 2; /* Sits on top of the main doodle canvas */
}
.doodle-canvas {
    z-index: 1;
}

/* --- FIX: Make the drawing canvases visible to override global style --- */
canvas.doodle-canvas, canvas.doodle-preview-canvas {
    display: block;
}

/* .doodle-canvas { */
    
    /* max-width: 100%; */
    /* max-height: 100%; */
    /* object-fit: contain; */
    /* transform-origin: 0 0; */
    /* transition: transform 0.2s ease-out; */
/* } */

.doodle-toolbar {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 40, 40, 0.85);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 10;
}
.doodle-toolbar button {
    background: #444;
    color: white;
    border: 1px solid #666;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}
.doodle-toolbar button:hover { background: #555; }
.doodle-toolbar button.active { background: #007bff; border-color: #0056b3;}

/* Color Picker */
.doodle-color-picker { position: relative; }
.doodle-color-display {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
}
.doodle-color-palette {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    border-radius: 8px;
    padding: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.doodle-color-palette.visible { opacity: 1; pointer-events: auto; }
.doodle-color {
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #555;
}

.settings-panel .settings-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: .5rem;
}



@media screen and (max-width: 800px) {
	.menu-item.menu-record {
        grid-template-areas: "title actions" "detail actions";
	}
	.menu-info-header {
		flex-direction: column;
	}
}
@media (max-width: 600px) {
    .doodle-toolbar {
        flex-direction: column;
        width: 55px;
        left: 15px;
        bottom: 50%;
        transform: translateY(50%);
    }
    .doodle-color-palette {
        left: 60px;
        bottom: 50%;
        transform: translateY(50%);
        flex-direction: column;
    }
}
