/**
 * SW Notes Platform CSS
 * WordPress Plugin Version
 * 
 * @package SW_Notes
 * @since 2.4.0
 */
/* WordPress Editor Container */
.sw-notes-wrapper .wp-editor-container {
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    background: var(--bg-color, #fff);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin: 0 !important;
	padding: 0 !important;
}

.sw-notes-wrapper .wp-editor-container.focused {
    border-color: var(--secondary-color, #3498db);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* WordPress Editor Wrap */
.sw-notes-wrapper .wp-editor-wrap {
    border: none !important;
    box-shadow: none !important;
}

/* Editor Toolbar */
.sw-notes-wrapper .wp-editor-tools {
    border-bottom: 1px solid var(--border-color, #ddd);
    background: #f9f9f9;
    padding: 8px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* TinyMCE Editor Area */
.sw-notes-wrapper .wp-editor-area {
    border: none !important;
}

.sw-notes-wrapper .wp-editor-area textarea {
    border: none !important;
    border-radius: 0 0 8px 8px;
    min-height: 300px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    padding: 15px;
    resize: vertical;
}

/* TinyMCE iframe content */
.sw-notes-wp-editor,
.sw-notes-wp-editor body {
    min-height: 300px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    background: #fff !important;
    padding: 15px !important;
}

/* Editor content styling */
.sw-notes-wp-editor p {
    margin-bottom: 1em;
    color: #333 !important;
    font-size: 16px;
    line-height: 1.6;
}

.sw-notes-wp-editor h1,
.sw-notes-wp-editor h2,
.sw-notes-wp-editor h3,
.sw-notes-wp-editor h4,
.sw-notes-wp-editor h5,
.sw-notes-wp-editor h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #2c3e50 !important;
    font-weight: bold;
}

.sw-notes-wp-editor h1 { font-size: 2em; }
.sw-notes-wp-editor h2 { font-size: 1.75em; }
.sw-notes-wp-editor h3 { font-size: 1.5em; }
.sw-notes-wp-editor h4 { font-size: 1.25em; }
.sw-notes-wp-editor h5 { font-size: 1.1em; }
.sw-notes-wp-editor h6 { font-size: 1em; }

.sw-notes-wp-editor ul,
.sw-notes-wp-editor ol {
    margin: 1em 0;
    padding-left: 2em;
}

.sw-notes-wp-editor ul {
    list-style-type: disc;
}

.sw-notes-wp-editor ol {
    list-style-type: decimal;
}

.sw-notes-wp-editor li {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.sw-notes-wp-editor blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    margin: 1em 0;
    font-style: italic;
    color: #666;
}

.sw-notes-wp-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sw-notes-wp-editor a {
    color: #3498db;
    text-decoration: none;
}

.sw-notes-wp-editor a:hover {
    text-decoration: underline;
}

.sw-notes-wp-editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.sw-notes-wp-editor table th,
.sw-notes-wp-editor table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.sw-notes-wp-editor table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.sw-notes-wp-editor hr {
    border: none;
    border-top: 2px solid #ddd;
    margin: 1.5em 0;
}

.sw-notes-wp-editor strong,
.sw-notes-wp-editor b {
    font-weight: bold;
}

.sw-notes-wp-editor em,
.sw-notes-wp-editor i {
    font-style: italic;
}

.sw-notes-wp-editor u {
    text-decoration: underline;
}

.sw-notes-wp-editor s,
.sw-notes-wp-editor del {
    text-decoration: line-through;
}

.sw-notes-wp-editor code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.sw-notes-wp-editor pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
}

/* Editor Controls */
.sw-notes-wrapper .editor-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--border-color, #ddd);
    margin-top: 15px;
}

.sw-notes-wrapper .auto-save-indicator {
    color: #666;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sw-notes-wrapper .auto-save-indicator.show {
    opacity: 1;
}

.sw-notes-wrapper .maximize-btn {
    background: var(--secondary-color, #3498db);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sw-notes-wrapper .maximize-btn:hover {
    background: var(--primary-color, #2c3e50);
}

/* Save Note Button */
.sw-notes-wrapper .save-note-btn {
    width: 100%;
    background: var(--secondary-color, #3498db);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.sw-notes-wrapper .save-note-btn:hover {
    background: var(--primary-color, #2c3e50);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Fullscreen Editor Styles */
.sw-notes-wrapper .note-editor.fullscreen .wp-editor-container {
    height: calc(100vh - 200px);
    border-radius: 0;
}

.sw-notes-wrapper .note-editor.fullscreen .wp-editor-area textarea {
    min-height: calc(100vh - 300px);
}

.sw-notes-wrapper .note-editor.fullscreen .sw-notes-wp-editor,
.sw-notes-wrapper .note-editor.fullscreen .sw-notes-wp-editor body {
    min-height: calc(100vh - 300px) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sw-notes-wrapper .wp-editor-container {
        border-radius: 4px;
        margin: 0;
    }
    
    .sw-notes-wrapper .wp-editor-area textarea {
        min-height: 250px;
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px;
    }
    
    .sw-notes-wrapper .sw-notes-wp-editor,
    .sw-notes-wrapper .sw-notes-wp-editor body {
        min-height: 250px !important;
        font-size: 16px !important;
        padding: 10px !important;
    }
    
    .sw-notes-wrapper .editor-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .sw-notes-wrapper .maximize-btn {
        order: -1;
        align-self: flex-end;
    }
}

/* WordPress Media Modal Compatibility */
.sw-notes-wrapper .media-modal {
    z-index: 10000;
}

.sw-notes-wrapper .media-modal-backdrop {
    z-index: 9999;
}

/* TinyMCE Toolbar Customization */
.sw-notes-wrapper .mce-toolbar-grp {
    background: #f9f9f9 !important;
    border-bottom: 1px solid #ddd !important;
}

.sw-notes-wrapper .mce-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
}

.sw-notes-wrapper .mce-btn:hover {
    background: rgba(0,0,0,0.1) !important;
    border-color: rgba(0,0,0,0.1) !important;
}

.sw-notes-wrapper .mce-btn.mce-active {
    background: var(--secondary-color, #3498db) !important;
    color: white !important;
}

/* WordPress Editor Dark Mode Support */
.sw-notes-wrapper[data-theme="dark"] .wp-editor-container {
    background: var(--bg-secondary, #2d2d2d);
    border-color: var(--border-color, #404040);
}

.sw-notes-wrapper[data-theme="dark"] .wp-editor-tools {
    background: var(--bg-secondary, #2d2d2d);
    border-color: var(--border-color, #404040);
}

.sw-notes-wrapper[data-theme="dark"] .wp-editor-area textarea {
    background: var(--bg-secondary, #2d2d2d);
    color: var(--text-primary, #e1e1e1);
    border-color: var(--border-color, #404040);
}

.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor,
.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor body {
    background: var(--bg-secondary, #2d2d2d) !important;
    color: var(--text-primary, #e1e1e1) !important;
}

.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor p {
    color: var(--text-primary, #e1e1e1) !important;
}

.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor h1,
.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor h2,
.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor h3,
.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor h4,
.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor h5,
.sw-notes-wrapper[data-theme="dark"] .sw-notes-wp-editor h6 {
    color: var(--accent-color, #4a9eff) !important;
}

/* Print Styles */
@media print {
    .sw-notes-wrapper .wp-editor-tools,
    .sw-notes-wrapper .editor-controls,
    .sw-notes-wrapper .save-note-btn {
        display: none !important;
    }
    
    .sw-notes-wrapper .wp-editor-container {
        border: none !important;
        box-shadow: none !important;
    }
    
    .sw-notes-wrapper .sw-notes-wp-editor,
    .sw-notes-wrapper .sw-notes-wp-editor body {
        background: white !important;
        color: black !important;
    }
}
/* Reset and Base Styles */
.sw-notes-wrapper {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --bg-color: #ffffff;
    --text-color: #333333 !important;
    --border-color: #e0e0e0;
    
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    touch-action: none;
}

.sw-notes-wrapper *,
.sw-notes-wrapper *::before,
.sw-notes-wrapper *::after {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Dark Mode Styles */
.sw-notes-wrapper[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e1e1e1;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --hover-bg: #363636;
    --accent-color: #4a9eff;
    --danger-color: #ff4444;
    --success-color: #4CAF50;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Sidebar Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .category-item {
    color: var(--text-secondary);
}

.sw-notes-wrapper[data-theme="dark"] .category-item:hover {
    background-color: var(--hover-bg);
}

.sw-notes-wrapper[data-theme="dark"] .category-item.active {
    background-color: var(--accent-color);
    color: white;
}

/* Note Cards Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .note-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.sw-notes-wrapper[data-theme="dark"] .note-card:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}

.sw-notes-wrapper[data-theme="dark"] .note-meta {
    color: var(--text-secondary);
}

/* Editor Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .note-editor {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .note-title,
.sw-notes-wrapper[data-theme="dark"] .note-category,
.sw-notes-wrapper[data-theme="dark"] .note-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .note-content[contenteditable="true"]:focus {
    outline: 1px solid var(--accent-color);
}

/* Buttons Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .btn:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent-color);
}

/* Search Bar Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .search-bar {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .search-bar:focus {
    border-color: var(--accent-color);
}

/* Formatting Toolbar Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .formatting-toolbar {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .format-btn {
    color: var(--text-secondary);
    background-color: transparent;
}

.sw-notes-wrapper[data-theme="dark"] .format-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

/* Modal Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .delete-modal-content,
.sw-notes-wrapper[data-theme="dark"] .password-modal-content,
.sw-notes-wrapper[data-theme="dark"] .tutorial-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] input[type="text"],
.sw-notes-wrapper[data-theme="dark"] input[type="password"] {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Full Screen Note View Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .note-card-open {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .note-card-open-meta {
    color: var(--text-secondary);
}

/* Scrollbar Dark Styles */
.sw-notes-wrapper[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

.sw-notes-wrapper[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.sw-notes-wrapper[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.sw-notes-wrapper[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--hover-bg);
}

/* Auto-save Indicator Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .auto-save-indicator {
    color: var(--text-secondary);
}

/* Color Palette Dark Styles */
.sw-notes-wrapper[data-theme="dark"] .color-palette .color-btn {
    border: 1px solid var(--border-color);
}

.sw-notes-wrapper[data-theme="dark"] .color-palette .color-btn.active {
    border: 2px solid var(--accent-color);
}

/* Dark mode specific styles */
.sw-notes-wrapper[data-theme='dark'] .note-card h3,
.sw-notes-wrapper[data-theme='dark'] .note-card .note-meta span {
    color: white;
}

.sw-notes-wrapper[data-theme='dark'] .note-card .note-preview {
    color: #e0e0e0;
}

.sw-notes-wrapper[data-theme='dark'] .note-card-open-content {
    color: black;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 10px 0;
    line-height: 1.6;
}

.sw-notes-wrapper[data-theme='dark'] .note-card-open-title,
.sw-notes-wrapper[data-theme='dark'] .note-card-open-meta span {
    color: white;
}

/* Ensure text remains readable when content is selected */
.sw-notes-wrapper[data-theme='dark'] .note-card-open-content::selection {
    background-color: #2196F3;
    color: white;
}

.sw-notes-wrapper[data-theme='dark'] .note-card-open-content::-moz-selection {
    background-color: #2196F3;
    color: white;
}

.sw-notes-wrapper p {
    font-size: 16px;
    font-weight: small !important;
    outline: none;
    font-family: inherit;
    line-height: normal;
    letter-spacing: normal;
    color: #666666;
    font-style: normal;
    text-decoration: none;
    text-shadow: none;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.sw-notes-wrapper .container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sw-notes-wrapper .sidebar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sw-notes-wrapper .sidebar h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff
}

.sw-notes-wrapper .sidebar h2 {
    color: #ffffff;
}

.sw-notes-wrapper .categories {
    list-style: none;
}

/* Import/Export Controls Styles */
.sw-notes-wrapper .import-export-controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sw-notes-wrapper .control-section-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-notes-wrapper .control-section-title::before {
    content: "🔧";
    font-size: 1rem;
}

.sw-notes-wrapper .export-section,
.sw-notes-wrapper .import-section {
    margin-bottom: 12px;
}

.sw-notes-wrapper .export-control-btn,
.sw-notes-wrapper .import-control-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    font-size: 14px;
}

.sw-notes-wrapper .export-control-btn::before,
.sw-notes-wrapper .import-control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.sw-notes-wrapper .export-control-btn:hover::before,
.sw-notes-wrapper .import-control-btn:hover::before {
    left: 100%;
}

.sw-notes-wrapper .export-control-btn:hover,
.sw-notes-wrapper .import-control-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.12));
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sw-notes-wrapper .export-control-btn:active,
.sw-notes-wrapper .import-control-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sw-notes-wrapper .btn-icon-wrapper {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sw-notes-wrapper .btn-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sw-notes-wrapper .btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.sw-notes-wrapper .btn-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.2;
}

.sw-notes-wrapper .btn-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.2;
    font-weight: 400;
}

.sw-notes-wrapper .btn-arrow {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sw-notes-wrapper .export-control-btn:hover .btn-arrow,
.sw-notes-wrapper .import-control-btn:hover .btn-arrow {
    transform: translateX(4px);
    color: rgba(255, 255, 255, 1);
}

/* Special styling for export button */
.sw-notes-wrapper .export-control-btn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(67, 160, 71, 0.2));
    border-color: rgba(76, 175, 80, 0.4);
}

.sw-notes-wrapper .export-control-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(67, 160, 71, 0.3));
    border-color: rgba(76, 175, 80, 0.6);
}

.sw-notes-wrapper .export-control-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(67, 160, 71, 0.2));
    border-color: rgba(76, 175, 80, 0.3);
}

/* Special styling for import button */
.sw-notes-wrapper .import-control-btn {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(30, 136, 229, 0.2));
    border-color: rgba(33, 150, 243, 0.4);
}

.sw-notes-wrapper .import-control-btn:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.4), rgba(30, 136, 229, 0.3));
    border-color: rgba(33, 150, 243, 0.6);
}

.sw-notes-wrapper .import-control-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(30, 136, 229, 0.2));
    border-color: rgba(33, 150, 243, 0.3);
}

/* Progress bars for import/export */
.sw-notes-wrapper .export-progress-container,
.sw-notes-wrapper .import-progress-container {
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sw-notes-wrapper .export-progress-container.show,
.sw-notes-wrapper .import-progress-container.show {
    opacity: 1;
}

/* Main Content */
.sw-notes-wrapper .main-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch !important; /* Enable smooth scrolling on iOS devices */
    touch-action: pan-y; /* Enable vertical touch scrolling */
    height: 100%;
    position: relative;
    /* Ensure content is scrollable on touch devices */
    overscroll-behavior-y: contain;
    /* Prevent elastic scrolling on some tablets */
    -webkit-overflow-scrolling: touch;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Media query for tablets */
@media (max-width: 1024px) and (min-width: 768px) {
    .sw-notes-wrapper .main-content {
        -webkit-overflow-scrolling: touch !important; /* Enable smooth scrolling on iOS devices */
        -webkit-user-select: none; /* Prevent text selection interfering with scroll */
        user-select: none;
        padding: 5px;
    }
    
    /* Re-enable text selection within note cards */
    .sw-notes-wrapper .note-card {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Search and Controls */
.sw-notes-wrapper .controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Buttons */
.sw-notes-wrapper .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--secondary-color);
    color: white;
    transition: opacity 0.3s;
}

.sw-notes-wrapper .btn:hover {
    opacity: 0.9;
}

.sw-notes-wrapper .note-title {
    padding: 0.5rem;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.sw-notes-wrapper .note-category {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Formatting toolbar extensions */
.sw-notes-wrapper .formatting-toolbar {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    padding: 0.5rem;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.sw-notes-wrapper .format-btn.divider {
    margin: 0;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.4);
}

/* Divider line */
.sw-notes-wrapper .note-divider {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 1rem 0;
}

/* List styles */
.sw-notes-wrapper .note-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
}

.sw-notes-wrapper .note-content ol {
    list-style-type: decimal;
    margin-left: 1.5rem;
}

.sw-notes-wrapper .note-content ol[type="a"] {
    list-style-type: lower-alpha;
}

.sw-notes-wrapper .format-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    background-color: #34495e;
    color: white;
}

.sw-notes-wrapper .format-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sw-notes-wrapper .note-content[contenteditable="true"] {
    min-height: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    background-color: var(--bg-color);
    color: var(--text-color);
    outline: none;
    overflow-y: auto;
    white-space: pre-wrap;
}

.sw-notes-wrapper .note-content[contenteditable="true"]:empty:before {
    content: attr(placeholder);
    color: #888;
}

/* Notes List */
.sw-notes-wrapper .notes-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    transition: opacity 0.5s ease-in-out;
}

.sw-notes-wrapper .note-card {
    padding: 1rem;
    border: 2px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    /* Add these new properties */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    background-color: var(--bg-color);
}

.sw-notes-wrapper .note-card:hover {
    transform: translateY(-2px);
}

.sw-notes-wrapper .note-card h3 {
    margin-bottom: 0.5rem;
    color: #000000;
}

.sw-notes-wrapper .note-meta {
    font-size: 0.8rem;
    color: #000000 !important;
    margin-bottom: 0.5rem;
}

.sw-notes-wrapper .formatting-toolbar .auto-save-indicator {
    margin-left: auto;  /* This pushes it to the right */
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sw-notes-wrapper .formatting-toolbar .auto-save-indicator.show {
    opacity: 1;
}

/* Buttons in open note */
.sw-notes-wrapper .note-card-open-buttons {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
}

/* Modify the close button style - find the existing .close-btn class and replace it */
.sw-notes-wrapper .close-btn {
    position: fixed;  /* Changed from absolute to fixed */
    bottom: 20px;    /* Changed from top to bottom */
    right: 20px;
    width: 40px;     /* Made slightly larger */
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1001;   /* Added z-index to ensure it's above other elements */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);  /* Added shadow for better visibility */
}

/* Ensure edit button is visible - find the existing .edit-btn class and replace it */
.sw-notes-wrapper .edit-btn {
    width: 30px;     /* Made larger */
    height: 30px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Delete Button Style */
.sw-notes-wrapper .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ff4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    padding: 0;
}

/* Delete Confirmation Modal */
.sw-notes-wrapper .delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.sw-notes-wrapper .delete-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}

.sw-notes-wrapper .delete-modal input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sw-notes-wrapper .delete-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.sw-notes-wrapper .delete-modal .btn-confirm {
    background-color: #ff4444;
}

.sw-notes-wrapper .delete-modal .btn-cancel {
    background-color: #666;
}

/* Tutorial Overlay */
.sw-notes-wrapper .tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.sw-notes-wrapper .tutorial-content {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
}

.sw-notes-wrapper .tutorial-content h2 {
    margin-bottom: 1rem;
    color: #000000
}

.sw-notes-wrapper .tutorial-content p {
    margin-bottom: 0.5rem;
    color: #000000
}

/* Update the position properties in your export-notification class */
.sw-notes-wrapper .export-notification {
    position: fixed;
    top: 20px;           /* Changed from bottom to top */
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);  /* Changed from positive to negative value */
    transition: opacity 0.3s, transform 0.3s;
}

.sw-notes-wrapper .export-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.sw-notes-wrapper .export-notification strong {
    display: block;
    margin-bottom: 5px;
}

.sw-notes-wrapper .password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;  /* Increased from 1000 to 2000 */
}

.sw-notes-wrapper .password-modal-content {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 2001;  /* Added z-index higher than modal backdrop */
}

.sw-notes-wrapper .password-modal-content h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.sw-notes-wrapper .password-modal-content input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.sw-notes-wrapper .password-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Fullscreen styles */
.sw-notes-wrapper .note-editor.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background: var(--bg-color);
    padding: 5px;
    margin: 0;
    overflow-y: auto; /* Enable scrolling */
}

.sw-notes-wrapper .note-editor.fullscreen .note-content {
    min-height: calc(100vh - 200px); /* Change height to min-height */
    resize: vertical; /* Allow vertical resizing */
}

/* Maximize button style */
/* Maximize/Minimize button styles */
.sw-notes-wrapper .maximize-btn {
    margin-left: auto;
    position: relative;
    transition: transform 0.3s ease;
}

.sw-notes-wrapper .maximize-btn .maximize-icon,
.sw-notes-wrapper .maximize-btn .minimize-icon {
    font-size: 18px;
    line-height: 1;
}

.sw-notes-wrapper .note-editor.fullscreen .maximize-btn .maximize-icon {
    display: none;
}

.sw-notes-wrapper .note-editor.fullscreen .maximize-btn .minimize-icon {
    display: inline !important;
}

.sw-notes-wrapper .format-btn[data-table] {
    font-size: 0.8em;
    padding: 2px 6px;
}

/* Main Header Styles */
.sw-notes-wrapper .main-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    background: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    height: 60px; /* Fixed height */
    top: 0;
    z-index: 100;
}

/* Menu Button Styles */
.sw-notes-wrapper .menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Sidebar Styles */
.sw-notes-wrapper .sidebar {
	overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.3s ease;
}

/* Add this to your CSS styles */
.sw-notes-wrapper .sidebar-close {
    display: none; /* Hidden by default */
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .sw-notes-wrapper .sidebar.active .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sw-notes-wrapper .container {
        grid-template-columns: 1fr;
    }
    
    .sw-notes-wrapper #main .main-content {
        margin: 0;
        padding: 5px;
        position: relative;  /* Add positioning context */
        z-index: 1;         /* Lower z-index than header */
    }
    
    .sw-notes-wrapper .main-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Enable smooth scrolling on iOS devices */
        height: 100%;
        position: relative;
        touch-action: pan-y; /* Enable vertical touch scrolling */
        -ms-touch-action: pan-y;
        overscroll-behavior-y: contain; /* Prevent pull-to-refresh on mobile */
    }

    .sw-notes-wrapper .main-header {
        gap: 5px;
        top: 0;
        margin: 0;          /* Reset margins */
        padding: 5px !important;
        z-index: 1000;      /* Ensure header stays above content */
        width: 100%;        /* Full width */
    }

    .sw-notes-wrapper .controls {
        padding: 0.5rem;    /* Add padding to search controls */
    }

    /* Optional: Add some space below header */
    .sw-notes-wrapper .main-header + .controls {
        margin-top: 0.5rem;
    }

    .sw-notes-wrapper .menu-btn {
        display: block !important;
    }

    .sw-notes-wrapper .sidebar {
        position: fixed;
        padding-top: 1rem;
        top: 0;
        left: 0;
        height: 100vh;
        width: 80%; /* Changed from 250px to 80% */
        transform: translateX(-100%);
        z-index: 1000;
    }

    .sw-notes-wrapper .sidebar.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100vh; /* Full viewport height */
        z-index: 1000;
        transform: translateX(0);
        overflow-y: auto; /* Enable vertical scrolling */
        overflow-x: hidden; /* Prevent horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding-bottom: 20px; /* Add bottom padding for better UX */
    }
    
    /* Ensure sidebar content doesn't exceed viewport */
    .sw-notes-wrapper .sidebar.active .categories,
    .sw-notes-wrapper .sidebar.active .import-export-controls,
    .sw-notes-wrapper .sidebar.active .sync-controls,
    .sw-notes-wrapper .sidebar.active .theme-switch-wrapper,
    .sw-notes-wrapper .sidebar.active .copyright-wrapper {
        flex-shrink: 0; /* Prevent content from shrinking */
    }

    .sw-notes-wrapper .menu-toggle {
        display: block;
    }

    /* Adjust import/export controls for mobile */
    .sw-notes-wrapper .import-export-controls {
        padding: 12px;
        margin: 12px 0;
    }

    .sw-notes-wrapper .export-control-btn,
    .sw-notes-wrapper .import-control-btn {
        padding: 12px 14px;
    }

    .sw-notes-wrapper .btn-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .sw-notes-wrapper .btn-title {
        font-size: 0.9rem;
    }

    .sw-notes-wrapper .btn-subtitle {
        font-size: 0.75rem;
    }
}

.sw-notes-wrapper .format-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sw-notes-wrapper .format-btn#undoBtn,
.sw-notes-wrapper .format-btn#redoBtn {
    font-size: 18px;
    padding: 0 4px;
}

/* Add near the note editor styles */
.sw-notes-wrapper .note-editor.fullscreen .note-content {
    font-size: 16px; /* Base font size */
    transition: font-size 0.1s;
}

.sw-notes-wrapper .zoom-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sw-notes-wrapper .zoom-notice.show {
    opacity: 1;
}

.sw-notes-wrapper .zoom-notice kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
}


.sw-notes-wrapper .color-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.sw-notes-wrapper .color-btn:hover {
    transform: scale(1.1);
}

.sw-notes-wrapper .color-btn.active {
    box-shadow: 0 0 0 2px #000;
}

/* Add these styles in your existing CSS, after the base styles */

/* Enhanced Note Card Open Styles */
.sw-notes-wrapper .note-card-open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color, #fff);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    overflow: hidden;
}

/* Responsive Header */
.sw-notes-wrapper .note-card-open-header {
    padding: 0.8rem;
    background: var(--primary-color, #2196f3);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sw-notes-wrapper .note-card-open-title {
    font-size: 1.25rem;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-notes-wrapper .note-card-open-meta {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Enhanced Button Styles */
.sw-notes-wrapper .note-card-open .edit-btn,
.sw-notes-wrapper .note-card-open .close-btn {
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.sw-notes-wrapper .note-card-open .edit-btn:hover,
.sw-notes-wrapper .note-card-open .close-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Content Area */
.sw-notes-wrapper .note-card-open-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    line-height: 1.6;
}

/* Export Button */
.sw-notes-wrapper .export-single-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary-color, #2196f3);
    color: white;
    border: none;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.sw-notes-wrapper .export-single-btn:hover {
    transform: translateY(-2px);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .sw-notes-wrapper .note-card-open-header {
        padding: 0.6rem;
    }
    
    .sw-notes-wrapper .note-card-open-title {
        font-size: 1.1rem;
    }
    
    .sw-notes-wrapper .note-card-open .edit-btn,
    .sw-notes-wrapper .note-card-open .close-btn {
        width: 2rem;
        height: 2rem;
    }
    
    .sw-notes-wrapper .note-card-open-content {
        padding: 0.8rem;
    }
}

/* Animation */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Search Active State */
.sw-notes-wrapper .search-active .note-editor {
    display: none;
}

.sw-notes-wrapper .search-active .notes-list {
    position: relative;
    animation: slideUpSearch 0.3s ease-out forwards;
}

.sw-notes-wrapper .search-bar {
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    width: 200px;
    outline: none;
}

.sw-notes-wrapper .search-active .search-bar {
    width: 100%;
    max-width: 600px;
    font-size: 1.1em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sw-notes-wrapper .search-results-info {
    margin: 10px 0;
    color: #666;
    font-size: 0.9em;
    opacity: 0;
    transform: translateY(20px);
}

.sw-notes-wrapper .search-active .search-results-info {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease 0.2s;
}

/* Search Animations */
@keyframes slideUpSearch {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Note Card Animations during search */
.sw-notes-wrapper .search-active .note-card {
    animation: popIn 0.3s ease-out forwards;
    animation-delay: calc(var(--card-index) * 0.05s);
}

@keyframes popIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Empty Search State */
.sw-notes-wrapper .empty-search {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: none;
}

.sw-notes-wrapper .search-active .empty-search {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .sw-notes-wrapper .search-active .search-bar {
        font-size: 1em;
        padding: 6px 12px;
    }
    
    .sw-notes-wrapper .search-results-info {
        font-size: 0.8em;
    }
}

/* Enhanced Category Styles */
.sw-notes-wrapper .category-item {
    padding: 8px 15px;
    margin: 4px 0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.sw-notes-wrapper .category-item:hover {
    background: rgba(var(--primary-rgb, 33, 150, 243), 0.1);
}

.sw-notes-wrapper .category-item.active {
    background: #dddddd !important;
    color: #333333;
    transform: translateX(10px);
}

/* Category Filter Active State */
.sw-notes-wrapper .category-active .note-editor {
    display: none;
}

.sw-notes-wrapper .category-active .notes-list {
    position: relative;
    animation: slideUpCategory 0.3s ease-out forwards;
}

.sw-notes-wrapper .category-results-info {
    margin: 10px 0;
    color: #666;
    font-size: 0.9em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.sw-notes-wrapper .category-active .category-results-info {
    opacity: 1;
    transform: translateY(0);
}

/* Category Animation */
@keyframes slideUpCategory {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Empty Category State */
.sw-notes-wrapper .empty-category {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: none;
}

.sw-notes-wrapper .category-active .empty-category {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .sw-notes-wrapper .category-item {
        padding: 10px 15px;
        font-size: 0.95em;
    }
    
    .sw-notes-wrapper .category-results-info {
        font-size: 0.8em;
        margin: 8px 0;
    }
    
    .sw-notes-wrapper .sidebar.active .category-item.active {
        transform: translateX(5px);
    }
    
    .sw-notes-wrapper .search-active .search-bar {
        box-shadow: none;
    }
}

.sw-notes-wrapper .create-note-container {
    display: none;
}

/* Floating Button Styles */
.sw-notes-wrapper .floating-create-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #4caf50, #81c784);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

/* Icon Styling */
.sw-notes-wrapper .floating-create-btn .plus-icon {
    font-size: 1.5rem;
    line-height: 1;
    background: white;
    color: #4caf50;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.sw-notes-wrapper .floating-create-btn:hover .plus-icon {
    transform: rotate(45deg);
    background: #66bb6a;
    color: white;
}

/* Button Hover Effect */
.sw-notes-wrapper .floating-create-btn:hover {
    background: linear-gradient(135deg, #45a049, #66bb6a);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.sw-notes-wrapper .floating-create-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Button Text Styling */
.sw-notes-wrapper .floating-create-btn .btn-text {
    font-weight: bold;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.sw-notes-wrapper .floating-create-btn:hover .btn-text {
    color: #f1f8e9;
}

/* Media Query for Smaller Devices */
@media (max-width: 768px) {
    .sw-notes-wrapper .floating-create-btn {
        padding: 0.5rem 1rem;
        bottom: 1rem;
        right: 1rem;
        font-size: 0.9rem;
    }

    .sw-notes-wrapper .floating-create-btn .plus-icon {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }
}

.sw-notes-wrapper .plus-icon {
    font-size: 20px;
    margin-right: 8px;
}

.sw-notes-wrapper .note-editor {
    display: none;
    flex-direction: column;
    height: 100%;
    background: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    gap: 0;
    margin-bottom: 2rem;
}

.sw-notes-wrapper .note-editor > *:not(.editor-header) {
    padding: 0 12px;
}

.sw-notes-wrapper .note-editor .wp-editor-container {
    margin: 0;
}

.sw-notes-wrapper .note-editor .wp-editor-container {
    margin: 0;
}

.sw-notes-wrapper .note-editor.active,
.sw-notes-wrapper .note-editor.fullscreen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sw-notes-wrapper .note-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 200px;
    max-height: calc(100vh - 200px); /* Adjust based on your toolbar height */
}

.sw-notes-wrapper .close-editor-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    padding: 5px 10px;
    z-index: 10;
    background-color: #3498db !important;
}

.sw-notes-wrapper .close-editor-btn:hover {
    opacity: 1;
}

.sw-notes-wrapper .note-editor {
    position: relative;  /* Add this to properly position the close button */
}

.sw-notes-wrapper .maximize-btn:hover {
    transform: rotate(180deg);
}

/* Search bar focus animation */
.sw-notes-wrapper .search-bar {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.sw-notes-wrapper .search-bar:focus {
    transform: scale(1.02);
}

.sw-notes-wrapper .theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    margin: 10px 0;
}

.sw-notes-wrapper #toggleTheme {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: none;
    padding: 0;
}

.sw-notes-wrapper #toggleTheme::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s, background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sw-notes-wrapper[data-theme='dark'] #toggleTheme {
    background: #4a5568;
}

.sw-notes-wrapper[data-theme='dark'] #toggleTheme::after {
    transform: translateX(30px);
    background: #2d3748;
}

.sw-notes-wrapper .theme-icon {
    font-size: 20px;
    color: #718096;
}

.sw-notes-wrapper[data-theme='dark'] .theme-icon {
    color: #a0aec0;
}

.sw-notes-wrapper .floating-create-btn.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

@media screen and (max-width: 768px) {
    .sw-notes-wrapper .note-editor.fullscreen .main-header {
        display: none !important;
    }
}

.sw-notes-wrapper .hidden {
    display: none !important;
}

.sw-notes-wrapper .copyright-wrapper {
    margin-top: 20px;
    padding: 15px 10px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sw-notes-wrapper .copyright-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.sw-notes-wrapper .info-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 5px 15px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.sw-notes-wrapper .info-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.sw-notes-wrapper .info-icon {
    font-size: 1.1em;
}

.sw-notes-wrapper .info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
}

.sw-notes-wrapper .info-modal.show {
    opacity: 1;
}

.sw-notes-wrapper .info-modal-header {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sw-notes-wrapper .info-modal-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.sw-notes-wrapper .info-close-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-notes-wrapper .info-close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.sw-notes-wrapper .info-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

@media (max-width: 768px) { 
    .sw-notes-wrapper .info-modal-content {
        padding: 5px; /* Reduced padding for mobile devices */
    }
}

.sw-notes-wrapper .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sw-notes-wrapper .info-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.sw-notes-wrapper .info-card:hover {
    transform: translateY(-5px);
}

.sw-notes-wrapper .info-card h3 {
    color: #2c3e50;
    margin-top: 0;
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(44,62,80,0.1);
    margin-bottom: 1rem;
}

.sw-notes-wrapper .info-card ul {
    padding-left: 1.2rem;
    margin: 0;
}

.sw-notes-wrapper .info-card li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.sw-notes-wrapper .info-card p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.sw-notes-wrapper .feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.sw-notes-wrapper .feature-item {
    background: rgba(44,62,80,0.05);
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sw-notes-wrapper .security-tip {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 0 4px 4px 0;
}

/* Unique Dark Mode Variables */
.sw-notes-wrapper[data-theme='dark'] {
    --gswa-bg-color: #121212;
    --gswa-bg-secondary: #1e1e1e;
    --gswa-text-color: rgba(255, 255, 255, 0.9);
    --gswa-text-secondary: rgba(255, 255, 255, 0.7);
    --gswa-border-color: rgba(255, 255, 255, 0.2);
    --gswa-shadow-color: rgba(0, 0, 0, 0.5);
    --gswa-highlight-color: rgba(255, 255, 255, 0.1);
    --gswa-hover-color: rgba(255, 255, 255, 0.2);
    --gswa-card-shadow: rgba(0, 0, 0, 0.3);
}

/* Buttons */
.sw-notes-wrapper[data-theme='dark'] .info-btn {
    background: var(--gswa-highlight-color);
    border: 1px solid var(--gswa-border-color);
    color: var(--gswa-text-color);
}
.sw-notes-wrapper[data-theme='dark'] .info-btn:hover {
    background: var(--gswa-hover-color);
}

/* Info Modal */
.sw-notes-wrapper[data-theme='dark'] .info-modal {
    background: var(--gswa-bg-color);
    color: var(--gswa-text-color);
}
.sw-notes-wrapper[data-theme='dark'] .info-modal-header {
    background: var(--gswa-bg-secondary);
    box-shadow: 0 2px 10px var(--gswa-card-shadow);
}
.sw-notes-wrapper[data-theme='dark'] .info-close-btn {
    background: var(--gswa-highlight-color);
    color: var(--gswa-text-color);
}
.sw-notes-wrapper[data-theme='dark'] .info-close-btn:hover {
    background: var(--gswa-hover-color);
}

/* Cards */
.sw-notes-wrapper[data-theme='dark'] .info-card {
    background: var(--gswa-bg-secondary);
    box-shadow: 0 4px 6px var(--gswa-card-shadow);
}
.sw-notes-wrapper[data-theme='dark'] .info-card:hover {
    transform: translateY(-5px);
}
.sw-notes-wrapper[data-theme='dark'] .info-card h3 {
    color: var(--gswa-text-color);
    border-bottom: 2px solid var(--gswa-border-color);
}
.sw-notes-wrapper[data-theme='dark'] .info-card p,
.sw-notes-wrapper[data-theme='dark'] .info-card ul,
.sw-notes-wrapper[data-theme='dark'] .info-card li {
    color: var(--gswa-text-secondary);
}

/* Feature List */
.sw-notes-wrapper[data-theme='dark'] .feature-list .feature-item {
    background: var(--gswa-highlight-color);
    color: var(--gswa-text-color);
}

/* Security Tips */
.sw-notes-wrapper[data-theme='dark'] .security-tip {
    background: #2a2a2a;
    border-left: 4px solid #ffc107;
    color: var(--gswa-text-color);
}

/* Miscellaneous Elements */
.sw-notes-wrapper[data-theme='dark'] .progress-container {
    background-color: var(--gswa-bg-secondary);
}
.sw-notes-wrapper[data-theme='dark'] .progress-bar {
    background-color: #4caf50;
}
.sw-notes-wrapper[data-theme='dark'] .search-bar {
    background: var(--gswa-bg-secondary);
    color: var(--gswa-text-color);
    border: 1px solid var(--gswa-border-color);
}
.sw-notes-wrapper[data-theme='dark'] .search-bar::placeholder {
    color: var(--gswa-text-secondary);
}
.sw-notes-wrapper[data-theme='dark'] .menu-btn {
    color: var(--gswa-text-color);
    background: var(--gswa-highlight-color);
}

.sw-notes-wrapper[data-theme='dark'] .category-item .active {
    color: #000000;
}

.sw-notes-wrapper .progress-container {
    display: none;
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.sw-notes-wrapper .progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
}

/* Add animation for smoother transitions */
@keyframes progress {
    from { background-position: 0 0; }
    to { background-position: 50px 0; }
}

.sw-notes-wrapper .progress-bar {
    background-size: 50px 100%;
    animation: progress 2s linear infinite;
}

.sw-notes-wrapper .format-btn[data-format="increase-size"],
.sw-notes-wrapper .format-btn[data-format="decrease-size"] {
    font-family: monospace;
    font-weight: bold;
}

.sw-notes-wrapper .format-btn[data-format="increase-size"]:hover,
.sw-notes-wrapper .format-btn[data-format="decrease-size"]:hover {
    background-color: var(--hover-color);
}

/* Sync Controls Styles */
.sw-notes-wrapper .sync-controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sw-notes-wrapper .sync-status-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.sw-notes-wrapper .sync-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
    margin-right: 8px;
    transition: background-color 0.3s;
}

.sw-notes-wrapper .sync-indicator-dot.synced {
    background: #4CAF50;
}

.sw-notes-wrapper .sync-indicator-dot.syncing {
    background: #ffc107;
    animation: pulse 1.5s infinite;
}

.sw-notes-wrapper .sync-status-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.sw-notes-wrapper .sync-btn {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sw-notes-wrapper .sync-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.sw-notes-wrapper .sync-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sw-notes-wrapper .sync-btn.syncing {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.sw-notes-wrapper .sync-btn.syncing .sync-icon {
    animation: rotate 1s linear infinite;
}

.sw-notes-wrapper .load-from-db-btn {
    width: 100%;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.sw-notes-wrapper .load-from-db-btn:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* Auto Sync Toggle */
.sw-notes-wrapper .auto-sync-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.sw-notes-wrapper .auto-sync-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0;
}

.sw-notes-wrapper .toggle-switch {
    position: relative;
}

.sw-notes-wrapper .toggle-input {
    display: none;
}

.sw-notes-wrapper .toggle-label {
    display: block;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.sw-notes-wrapper .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sw-notes-wrapper .toggle-input:checked + .toggle-label {
    background: #4CAF50;
}

.sw-notes-wrapper .toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(20px);
}

/* Login Prompt */
.sw-notes-wrapper .login-prompt {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sw-notes-wrapper .login-prompt p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.sw-notes-wrapper .login-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.sw-notes-wrapper .login-btn:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Sync Notification */
.sw-notes-wrapper .sync-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 300px;
    font-size: 0.9rem;
}

.sw-notes-wrapper .sync-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.sw-notes-wrapper .sync-notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.sw-notes-wrapper .sync-notification.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.sw-notes-wrapper .sync-notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-notes-wrapper .sync-notification-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

.sw-notes-wrapper .sync-notification-text {
    flex: 1;
    font-weight: 500;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced note card indicators for sync status */
.sw-notes-wrapper .note-card {
    position: relative;
}

.sw-notes-wrapper .note-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4CAF50;
    opacity: 0;
    transition: opacity 0.3s;
}

.sw-notes-wrapper .note-card.synced::before {
    opacity: 1;
}

.sw-notes-wrapper .note-card.local-only::before {
    background: #ff9800;
    opacity: 1;
}

/* Mobile optimizations for sync controls */
@media (max-width: 768px) {
    .sw-notes-wrapper .sync-controls {
        padding: 12px;
        margin: 10px 0;
    }
    
    .sw-notes-wrapper .sync-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .sw-notes-wrapper .auto-sync-wrapper {
        padding: 6px;
    }
    
    .sw-notes-wrapper .sync-notification {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Loading states */
.sw-notes-wrapper .sync-btn.loading {
    position: relative;
    color: transparent;
}

.sw-notes-wrapper .sync-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Enhanced progress indicators */
.sw-notes-wrapper .sync-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.sw-notes-wrapper .sync-progress.show {
    opacity: 1;
}

.sw-notes-wrapper .sync-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Conflict resolution modal styles */
.sw-notes-wrapper .conflict-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.sw-notes-wrapper .conflict-modal.show {
    opacity: 1;
}

.sw-notes-wrapper .conflict-modal-content {
    background: var(--bg-color, #fff);
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.sw-notes-wrapper .conflict-modal h3 {
    margin-top: 0;
    color: #f44336;
}

.sw-notes-wrapper .conflict-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.sw-notes-wrapper .conflict-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.sw-notes-wrapper .conflict-btn.local {
    background: #ff9800;
    color: white;
}

.sw-notes-wrapper .conflict-btn.remote {
    background: #2196F3;
    color: white;
}

.sw-notes-wrapper .conflict-btn.merge {
    background: #4CAF50;
    color: white;
}

.sw-notes-wrapper .conflict-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dark mode styles for import/export controls */
.sw-notes-wrapper[data-theme='dark'] .import-export-controls {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.sw-notes-wrapper[data-theme='dark'] .control-section-title {
    color: rgba(255, 255, 255, 0.9);
}

.sw-notes-wrapper[data-theme='dark'] .export-control-btn,
.sw-notes-wrapper[data-theme='dark'] .import-control-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.sw-notes-wrapper[data-theme='dark'] .export-control-btn:hover,
.sw-notes-wrapper[data-theme='dark'] .import-control-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.25);
}

.sw-notes-wrapper[data-theme='dark'] .export-control-btn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(67, 160, 71, 0.15));
    border-color: rgba(76, 175, 80, 0.3);
}

.sw-notes-wrapper[data-theme='dark'] .export-control-btn:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(67, 160, 71, 0.25));
    border-color: rgba(76, 175, 80, 0.5);
}

.sw-notes-wrapper[data-theme='dark'] .import-control-btn {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(30, 136, 229, 0.15));
    border-color: rgba(33, 150, 243, 0.3);
}

.sw-notes-wrapper[data-theme='dark'] .import-control-btn:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(30, 136, 229, 0.25));
    border-color: rgba(33, 150, 243, 0.5);
}

.sw-notes-wrapper[data-theme='dark'] .btn-icon-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.1);
}

.sw-notes-wrapper[data-theme='dark'] .btn-title {
    color: rgba(255, 255, 255, 0.95);
}

.sw-notes-wrapper[data-theme='dark'] .btn-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.sw-notes-wrapper[data-theme='dark'] .btn-arrow {
    color: rgba(255, 255, 255, 0.7);
}

.sw-notes-wrapper[data-theme='dark'] .export-control-btn:hover .btn-arrow,
.sw-notes-wrapper[data-theme='dark'] .import-control-btn:hover .btn-arrow {
    color: rgba(255, 255, 255, 0.95);
}

/* Additional responsive fixes for import/export controls */
@media (max-width: 480px) {
    .sw-notes-wrapper .import-export-controls {
        padding: 10px;
        margin: 10px 0;
    }

    .sw-notes-wrapper .control-section-title {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .sw-notes-wrapper .export-control-btn,
    .sw-notes-wrapper .import-control-btn {
        padding: 10px 12px;
        gap: 8px;
    }

    .sw-notes-wrapper .btn-icon-wrapper {
        width: 32px;
        height: 32px;
    }

    .sw-notes-wrapper .btn-icon {
        font-size: 1rem;
    }

    .sw-notes-wrapper .btn-title {
        font-size: 0.85rem;
    }

    .sw-notes-wrapper .btn-subtitle {
        font-size: 0.7rem;
    }
}

/* Enhanced animations for import/export buttons */
.sw-notes-wrapper .export-control-btn,
.sw-notes-wrapper .import-control-btn {
    transform-origin: center;
}

.sw-notes-wrapper .export-control-btn:active,
.sw-notes-wrapper .import-control-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

/* Pulsing effect for progress indicators */
.sw-notes-wrapper .export-progress-container.show .export-progress,
.sw-notes-wrapper .import-progress-container.show .import-progress {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* Accessibility improvements */
.sw-notes-wrapper .export-control-btn:focus,
.sw-notes-wrapper .import-control-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.sw-notes-wrapper[data-theme='dark'] .export-control-btn:focus,
.sw-notes-wrapper[data-theme='dark'] .import-control-btn:focus {
    outline-color: rgba(255, 255, 255, 0.7);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sw-notes-wrapper .export-control-btn,
    .sw-notes-wrapper .import-control-btn {
        border-width: 2px;
        border-style: solid;
    }

    .sw-notes-wrapper .export-control-btn {
        border-color: #4CAF50;
    }

    .sw-notes-wrapper .import-control-btn {
        border-color: #2196F3;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sw-notes-wrapper .export-control-btn,
    .sw-notes-wrapper .import-control-btn {
        transition: none;
    }

    .sw-notes-wrapper .export-control-btn::before,
    .sw-notes-wrapper .import-control-btn::before {
        display: none;
    }

    .sw-notes-wrapper .btn-arrow {
        transition: none;
    }

    .sw-notes-wrapper .progress-bar {
        animation: none;
    }
}

/* Print styles */
@media print {
    .sw-notes-wrapper .import-export-controls,
    .sw-notes-wrapper .floating-create-btn,
    .sw-notes-wrapper .sync-controls {
        display: none !important;
    }
}

/* Force hardware acceleration for smooth animations */
.sw-notes-wrapper .export-control-btn,
.sw-notes-wrapper .import-control-btn,
.sw-notes-wrapper .btn-icon-wrapper,
.sw-notes-wrapper .btn-arrow {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}
/* User Profile Section */
.sw-notes-wrapper .user-profile-section {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.sw-notes-wrapper .user-profile-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
    cursor: pointer;
}

.sw-notes-wrapper .user-profile-wrapper:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sw-notes-wrapper .user-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.sw-notes-wrapper .avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sw-notes-wrapper .guest-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sw-notes-wrapper .status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease;
}

.sw-notes-wrapper .status-indicator.online {
    background-color: #4CAF50;
    animation: statusPulse 2s infinite;
}

.sw-notes-wrapper .status-indicator.offline {
    background-color: #f44336;
}

.sw-notes-wrapper .user-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Online status pulse animation */
@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sw-notes-wrapper .user-profile-wrapper {
        padding: 2px 6px;
        gap: 6px;
    }
    
    .sw-notes-wrapper .user-avatar {
        width: 28px;
        height: 28px;
    }
    
    .sw-notes-wrapper .user-name {
        font-size: 0.8rem;
        max-width: 80px;
    }
    
    .sw-notes-wrapper .status-indicator {
        width: 10px;
        height: 10px;
        bottom: -1px;
        right: -1px;
    }
}

/* Enhanced touch scrolling for mobile sidebar */
@media (max-width: 768px) {
    .sw-notes-wrapper .sidebar.active {
        /* Better touch scrolling */
        touch-action: pan-y;
        -ms-touch-action: pan-y;
        overscroll-behavior: contain;
        
        /* Ensure content is accessible */
        padding-top: 60px; /* Account for close button */
        box-sizing: border-box;
    }
    
    /* Ensure close button doesn't interfere with scrolling */
    .sw-notes-wrapper .sidebar.active .sidebar-close {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1001;
    }
}

/* NEW: Editor Header with 5-column grid */
.sw-notes-wrapper .editor-header {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    justify-items: center;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid var(--border-color, #ddd);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    gap: 10px;
    min-height: 40px;
}

/* Left corner: Save button */
.sw-notes-wrapper .editor-header .header-save-btn {
    justify-self: start;
    background: var(--secondary-color, #3498db);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sw-notes-wrapper .editor-header .header-save-btn:hover {
    background: var(--primary-color, #2c3e50);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Left corner: Auto-save indicator */
.sw-notes-wrapper .editor-header .new-auto-save-indicator {
    justify-self: start;
    color: #666;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sw-notes-wrapper .editor-header .new-auto-save-indicator.show {
    opacity: 1;
}

/* Center: Editor title */
.sw-notes-wrapper .editor-header .new-editor-title {
    justify-self: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color, #2c3e50);
    white-space: nowrap;
    text-align: center;
}

/* Right corner: Maximize button */
.sw-notes-wrapper .editor-header .new-maximize-btn {
    justify-self: end;
    background: var(--secondary-color, #3498db);
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 50px;
}

.sw-notes-wrapper .editor-header .new-maximize-btn:hover {
    background: var(--primary-color, #2c3e50);
}

/* Right corner: Close button */
.sw-notes-wrapper .editor-header .new-close-editor-btn {
    justify-self: end;
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 50px;
}

.sw-notes-wrapper .editor-header .new-close-editor-btn:hover {
    background: #c82333;
}

/* Mobile responsiveness for new elements */
@media (max-width: 768px) {
    .sw-notes-wrapper .editor-header {
        grid-template-columns: auto auto 1fr auto auto;
        padding: 6px 8px;
        gap: 4px;
        min-height: 36px;
    }
    
    .sw-notes-wrapper .editor-header .header-save-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .sw-notes-wrapper .editor-header .new-auto-save-indicator {
        font-size: 10px;
    }
    
    .sw-notes-wrapper .editor-header .new-editor-title {
        font-size: 12px;
    }
    
    .sw-notes-wrapper .editor-header .new-maximize-btn,
    .sw-notes-wrapper .editor-header .new-close-editor-btn {
        padding: 4px 6px;
        font-size: 11px;
        min-width: 40px;
    }
    
    .sw-notes-wrapper .title-category-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .sw-notes-wrapper .title-category-row .note-title,
    .sw-notes-wrapper .title-category-row .note-category {
        padding: 5px 6px;
        font-size: 13px;
    }
    
}







.sw-notes-wrapper .editor-header .maximize-btn {
    background: var(--secondary-color, #3498db);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.sw-notes-wrapper .editor-header .maximize-btn:hover {
    background: var(--primary-color, #2c3e50);
}

.sw-notes-wrapper .editor-header .close-editor-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.3s ease;
}

.sw-notes-wrapper .editor-header .close-editor-btn:hover {
    background: #c82333;
}

/* NEW: Compact title and category row */
.sw-notes-wrapper .title-category-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.sw-notes-wrapper .title-category-row .note-title {
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.sw-notes-wrapper .title-category-row .note-category {
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* UPDATED: Compact color palette */


.sw-notes-wrapper .color-palette .color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sw-notes-wrapper .color-palette .color-btn.active {
    box-shadow: 0 0 0 2px var(--secondary-color, #3498db);
    transform: scale(1.1);
}

/* Hide notes list when editor is active */
.sw-notes-wrapper .note-editor.active ~ .notes-list {
    display: none !important;
}

/* Mobile responsiveness for new elements */
@media (max-width: 768px) {
   
    
    .sw-notes-wrapper .editor-header .maximize-btn,
    .sw-notes-wrapper .editor-header .close-editor-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .sw-notes-wrapper .title-category-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .sw-notes-wrapper .title-category-row .note-title,
    .sw-notes-wrapper .title-category-row .note-category {
        padding: 5px 6px;
        font-size: 13px;
    }
    
   
}

/* Enhanced Color Palette with 40+ Colors */
.sw-notes-wrapper .color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));
    gap: 4px;
    margin: 8px 0;
    padding: 0;
    max-width: 100%;
    overflow: hidden;
}

.sw-notes-wrapper .color-palette .color-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    padding: 0;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.sw-notes-wrapper .color-palette .color-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    border-color: rgba(0,0,0,0.3);
}

.sw-notes-wrapper .color-palette .color-btn.active {
    box-shadow: 0 0 0 3px var(--secondary-color, #3498db);
    transform: scale(1.15);
    border-color: var(--secondary-color, #3498db);
    z-index: 10;
}

/* Special styling for white/light colors to have visible borders */
.sw-notes-wrapper .color-palette .color-btn[data-color="#ffffff"],
.sw-notes-wrapper .color-palette .color-btn[data-color*="#fff"],
.sw-notes-wrapper .color-palette .color-btn[data-color*="#f0f"],
.sw-notes-wrapper .color-palette .color-btn[data-color*="#f8f"],
.sw-notes-wrapper .color-palette .color-btn[data-color*="#fcf"] {
    border-color: #ddd;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .sw-notes-wrapper .color-palette {
        grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
        gap: 3px;
        margin: 6px 0;
    }
    
    .sw-notes-wrapper .color-palette .color-btn {
        width: 20px;
        height: 20px;
        border-radius: 4px;
    }
    
    .sw-notes-wrapper .color-palette .color-btn:hover {
        transform: scale(1.1);
    }
    
    .sw-notes-wrapper .color-palette .color-btn.active {
        transform: scale(1.1);
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .sw-notes-wrapper .color-palette {
        grid-template-columns: repeat(8, 1fr);
        gap: 2px;
    }
    
    .sw-notes-wrapper .color-palette .color-btn {
        width: 18px;
        height: 18px;
        border-radius: 3px;
    }
}

/* Elements Dropdown Styling */
.sw-notes-wrapper .mce-menu-item-text {
    font-size: 13px;
    padding: 2px 0;
}

.sw-notes-wrapper .mce-menu .mce-menu-item:hover {
    background-color: #f0f0f0;
}

.sw-notes-wrapper .mce-menu .mce-menu-item-text {
    white-space: nowrap;
}

/* Professional Elements Styling in Content */
.sw-notes-wp-editor span[style*="border-left: 3px solid"] {
    display: inline-block;
    margin: 2px 0;
    border-radius: 3px;
    font-weight: 500;
    font-size: 14px;
}

/* Enhanced element appearance */
.sw-notes-wp-editor span[style*="border-left: 3px solid"]:hover {
    opacity: 0.9;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* Mobile responsive for elements */
@media (max-width: 768px) {
    .sw-notes-wp-editor span[style*="border-left: 3px solid"] {
        font-size: 12px;
        padding: 2px 4px;
        margin: 1px 0;
    }
}





/* Todo Item Container */
.sw-notes-wp-editor .sw-todo-item {
    margin: 12px 0 !important;
    padding: 12px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #f8f9fa !important;
    font-family: inherit !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

.sw-notes-wp-editor .sw-todo-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px) !important;
}

/* Todo Header Section */
.sw-notes-wp-editor .todo-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}

/* Custom Checkbox */
.sw-notes-wp-editor .todo-checkbox {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #4CAF50 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    text-align: center !important;
    line-height: 16px !important;
    background: white !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
    font-size: 14px !important;
    color: #4CAF50 !important;
    flex-shrink: 0 !important;
}

.sw-notes-wp-editor .todo-checkbox:hover {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2) !important;
    transform: scale(1.1) !important;
}

/* Todo Title */
.sw-notes-wp-editor .todo-title {
    flex: 1 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    outline: none !important;
    padding: 4px 8px !important;
    border: 1px dashed transparent !important;
    border-radius: 4px !important;
    min-height: 24px !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
}

.sw-notes-wp-editor .todo-title:hover {
    border-color: #ccc !important;
    background: rgba(255,255,255,0.5) !important;
}

.sw-notes-wp-editor .todo-title:focus {
    border-style: solid !important;
    border-color: #4CAF50 !important;
    background: #f8fff8 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

/* Todo Priority Badge */
.sw-notes-wp-editor .todo-priority {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    background: #fff8e1 !important;
    color: #f57c00 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    border: 1px solid transparent !important;
}

.sw-notes-wp-editor .todo-priority:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    border-color: currentColor !important;
}

/* Todo Description */
.sw-notes-wp-editor .todo-description {
    margin: 8px 0 !important;
    padding: 8px !important;
    border: 1px dashed #ccc !important;
    border-radius: 4px !important;
    background: white !important;
    min-height: 40px !important;
    outline: none !important;
    font-size: 14px !important;
    color: #666 !important;
    transition: all 0.3s ease !important;
    display: block !important;
    line-height: 1.4 !important;
}

.sw-notes-wp-editor .todo-description:hover {
    border-color: #4CAF50 !important;
}

.sw-notes-wp-editor .todo-description:focus {
    border-style: solid !important;
    border-color: #4CAF50 !important;
    background: #f8fff8 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

/* Todo Footer */
.sw-notes-wp-editor .todo-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 8px !important;
    font-size: 11px !important;
    color: #888 !important;
}

/* Todo Actions */
.sw-notes-wp-editor .todo-actions {
    display: flex !important;
    gap: 8px !important;
}

.sw-notes-wp-editor .todo-delete {
    color: #f44336 !important;
    cursor: pointer !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
    font-weight: 500 !important;
}

.sw-notes-wp-editor .todo-delete:hover {
    background: rgba(244, 67, 54, 0.1) !important;
    transform: scale(1.05) !important;
    color: #d32f2f !important;
}

/* Completed Todo Styling */
.sw-notes-wp-editor .sw-todo-item[data-completed="true"] {
    background: #f0f8f0 !important;
    border-color: #4CAF50 !important;
    opacity: 0.8 !important;
}

/* Completion Timestamp */
.sw-notes-wp-editor .todo-completed {
    color: #4CAF50 !important;
    font-weight: 600 !important;
    background: rgba(76, 175, 80, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
}

/* Priority-based Border Styling */
.sw-notes-wp-editor .sw-todo-item[data-priority="urgent"] {
    border-left-width: 4px !important;
    border-left-color: #9c27b0 !important;
}

.sw-notes-wp-editor .sw-todo-item[data-priority="high"] {
    border-left-width: 4px !important;
    border-left-color: #f44336 !important;
}

/* Animations */
@keyframes todoComplete {
    0% { 
        background: #f8f9fa; 
        transform: scale(1); 
    }
    50% { 
        background: #e8f5e8; 
        transform: scale(1.02); 
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    }
    100% { 
        background: #f0f8f0; 
        transform: scale(1); 
    }
}

.sw-notes-wp-editor .sw-todo-item[style*="animation"] {
    animation-duration: 0.5s !important;
    animation-timing-function: ease !important;
    animation-fill-mode: forwards !important;
}

/* Placeholder Text Styling */
.sw-notes-wp-editor .todo-title[style*="italic"],
.sw-notes-wp-editor .todo-description[style*="italic"] {
    font-style: italic !important;
    color: #999 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sw-notes-wp-editor .sw-todo-item {
        padding: 10px !important;
        margin: 10px 0 !important;
    }
    
    .sw-notes-wp-editor .todo-header {
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .sw-notes-wp-editor .todo-title {
        font-size: 15px !important;
        min-width: 200px !important;
    }
    
    .sw-notes-wp-editor .todo-description {
        font-size: 13px !important;
        min-height: 35px !important;
        padding: 6px !important;
    }
    
    .sw-notes-wp-editor .todo-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    
    .sw-notes-wp-editor .todo-checkbox {
        width: 18px !important;
        height: 18px !important;
        line-height: 14px !important;
        font-size: 12px !important;
    }
    
    .sw-notes-wp-editor .todo-priority {
        font-size: 11px !important;
        padding: 3px 6px !important;
    }
}

/* Very Small Screens */
@media (max-width: 480px) {
    .sw-notes-wp-editor .sw-todo-item {
        padding: 8px !important;
        margin: 8px 0 !important;
    }
    
    .sw-notes-wp-editor .todo-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    .sw-notes-wp-editor .todo-title {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .sw-notes-wp-editor .todo-priority {
        align-self: flex-end !important;
    }
}

/* Print Styles */
@media print {
    .sw-notes-wp-editor .sw-todo-item {
        break-inside: avoid !important;
        margin: 6px 0 !important;
        padding: 6px !important;
        border: 1px solid #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .sw-notes-wp-editor .todo-delete,
    .sw-notes-wp-editor .todo-actions {
        display: none !important;
    }
    
    .sw-notes-wp-editor .todo-checkbox {
        border: 1px solid #333 !important;
        background: white !important;
    }
    
    .sw-notes-wp-editor .todo-description {
        border: none !important;
        background: transparent !important;
        padding: 4px 0 !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .sw-notes-wp-editor .sw-todo-item {
        border-width: 3px !important;
        border-color: #000 !important;
    }
    
    .sw-notes-wp-editor .todo-checkbox {
        border-width: 3px !important;
        border-color: #000 !important;
    }
    
    .sw-notes-wp-editor .todo-priority {
        border: 2px solid currentColor !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .sw-notes-wp-editor .sw-todo-item,
    .sw-notes-wp-editor .todo-checkbox,
    .sw-notes-wp-editor .todo-title,
    .sw-notes-wp-editor .todo-description,
    .sw-notes-wp-editor .todo-priority,
    .sw-notes-wp-editor .todo-delete {
        transition: none !important;
        animation: none !important;
    }
}

/* Add this CSS to sw-notes.css - append to existing todo CSS */

/* Ensure non-editable elements cannot be edited */
.sw-notes-wp-editor [contenteditable="false"] {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: default !important;
}

/* Exception for clickable elements */
.sw-notes-wp-editor .todo-checkbox[contenteditable="false"],
.sw-notes-wp-editor .todo-priority[contenteditable="false"],
.sw-notes-wp-editor .todo-delete[contenteditable="false"] {
    cursor: pointer !important;
}

/* Prevent caret from appearing in non-editable areas */
.sw-notes-wp-editor .todo-header[contenteditable="false"],
.sw-notes-wp-editor .todo-footer[contenteditable="false"],
.sw-notes-wp-editor .todo-actions[contenteditable="false"],
.sw-notes-wp-editor .todo-created[contenteditable="false"] {
    caret-color: transparent !important;
}

/* Ensure editable areas still work properly */
.sw-notes-wp-editor .todo-title[contenteditable="true"],
.sw-notes-wp-editor .todo-description[contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    cursor: text !important;
}

/* TinyMCE specific fixes */
.sw-notes-wp-editor .sw-todo-item[contenteditable="false"] {
    position: relative !important;
}

.sw-notes-wp-editor .sw-todo-item[contenteditable="false"]:before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* UNIVERSAL TODO CSS - Works in Editor AND View Mode */
/* Add this to sw-notes.css - covers both editor and view contexts */

/* Todo Item Container - Universal */
.sw-notes-wp-editor .sw-todo-item,
.sw-notes-wrapper .sw-todo-item {
    margin: 12px 0 !important;
    padding: 12px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: #f8f9fa !important;
    font-family: inherit !important;
    position: relative !important;
    display: block !important;
    transition: all 0.3s ease !important;
}

.sw-notes-wp-editor .sw-todo-item:hover,
.sw-notes-wrapper .sw-todo-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px) !important;
}

/* Todo Header Section - Universal */
.sw-notes-wp-editor .todo-header,
.sw-notes-wrapper .todo-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px !important;
}

/* Todo Checkbox Styling - Universal */
.sw-notes-wp-editor .todo-checkbox,
.sw-notes-wrapper .todo-checkbox {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #4CAF50 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    text-align: center !important;
    line-height: 16px !important;
    background: white !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
    font-size: 14px !important;
    color: #4CAF50 !important;
    flex-shrink: 0 !important;
}

.sw-notes-wp-editor .todo-checkbox:hover,
.sw-notes-wrapper .todo-checkbox:hover {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2) !important;
    transform: scale(1.1) !important;
}

/* Todo Title Styling - Universal */
.sw-notes-wp-editor .todo-title,
.sw-notes-wrapper .todo-title {
    flex: 1 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    outline: none !important;
    padding: 4px 8px !important;
    border: 1px dashed transparent !important;
    border-radius: 4px !important;
    min-height: 24px !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
}

.sw-notes-wp-editor .todo-title:hover,
.sw-notes-wrapper .todo-title:hover {
    border-color: #ccc !important;
    background: rgba(255,255,255,0.5) !important;
}

.sw-notes-wp-editor .todo-title:focus,
.sw-notes-wrapper .todo-title:focus {
    border-style: solid !important;
    border-color: #4CAF50 !important;
    background: #f8fff8 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

/* Todo Priority Badge - Universal */
.sw-notes-wp-editor .todo-priority,
.sw-notes-wrapper .todo-priority {
    padding: 4px 8px !important;
    border-radius: 4px !important;
    background: #fff8e1 !important;
    color: #f57c00 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    border: 1px solid transparent !important;
}

.sw-notes-wp-editor .todo-priority:hover,
.sw-notes-wrapper .todo-priority:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    border-color: currentColor !important;
}

/* Todo Description Styling - Universal */
.sw-notes-wp-editor .todo-description,
.sw-notes-wrapper .todo-description {
    margin: 8px 0 !important;
    padding: 8px !important;
    border: 1px dashed #ccc !important;
    border-radius: 4px !important;
    background: white !important;
    min-height: 40px !important;
    outline: none !important;
    font-size: 14px !important;
    color: #666 !important;
    transition: all 0.3s ease !important;
    display: block !important;
    line-height: 1.4 !important;
}

.sw-notes-wp-editor .todo-description:hover,
.sw-notes-wrapper .todo-description:hover {
    border-color: #4CAF50 !important;
}

.sw-notes-wp-editor .todo-description:focus,
.sw-notes-wrapper .todo-description:focus {
    border-style: solid !important;
    border-color: #4CAF50 !important;
    background: #f8fff8 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

/* Todo Footer Section - Universal */
.sw-notes-wp-editor .todo-footer,
.sw-notes-wrapper .todo-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 8px !important;
    font-size: 11px !important;
    color: #888 !important;
}

/* Todo Created Date - Universal */
.sw-notes-wp-editor .todo-created,
.sw-notes-wrapper .todo-created {
    font-size: 11px !important;
    color: #888 !important;
    user-select: none !important;
}

/* Todo Actions Container - Universal */
.sw-notes-wp-editor .todo-actions,
.sw-notes-wrapper .todo-actions {
    display: flex !important;
    gap: 8px !important;
}

/* Todo Delete Button - Universal */
.sw-notes-wp-editor .todo-delete,
.sw-notes-wrapper .todo-delete {
    color: #f44336 !important;
    cursor: pointer !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
    font-weight: 500 !important;
    font-size: 11px !important;
}

.sw-notes-wp-editor .todo-delete:hover,
.sw-notes-wrapper .todo-delete:hover {
    background: rgba(244, 67, 54, 0.1) !important;
    transform: scale(1.05) !important;
    color: #d32f2f !important;
}

/* Completed State Styling - Universal */
.sw-notes-wp-editor .sw-todo-item[data-completed="true"],
.sw-notes-wrapper .sw-todo-item[data-completed="true"] {
    background: #f0f8f0 !important;
    border-color: #4CAF50 !important;
    opacity: 0.8 !important;
}

.sw-notes-wp-editor .sw-todo-item[data-completed="true"] .todo-title,
.sw-notes-wrapper .sw-todo-item[data-completed="true"] .todo-title {
    text-decoration: line-through !important;
    opacity: 0.7 !important;
}

.sw-notes-wp-editor .sw-todo-item[data-completed="true"] .todo-description,
.sw-notes-wrapper .sw-todo-item[data-completed="true"] .todo-description {
    text-decoration: line-through !important;
    opacity: 0.7 !important;
}

/* Checkbox Checked State - Universal */
.sw-notes-wp-editor .todo-checkbox[data-checked="true"],
.sw-notes-wrapper .todo-checkbox[data-checked="true"] {
    background: #4CAF50 !important;
    color: white !important;
}

/* Priority Level Styling - Universal */
.sw-notes-wp-editor .todo-priority[data-priority="low"],
.sw-notes-wrapper .todo-priority[data-priority="low"] {
    background: #e8f5e8 !important;
    color: #4CAF50 !important;
}

.sw-notes-wp-editor .todo-priority[data-priority="normal"],
.sw-notes-wrapper .todo-priority[data-priority="normal"] {
    background: #fff8e1 !important;
    color: #f57c00 !important;
}

.sw-notes-wp-editor .todo-priority[data-priority="high"],
.sw-notes-wrapper .todo-priority[data-priority="high"] {
    background: #ffebee !important;
    color: #f44336 !important;
}

.sw-notes-wp-editor .todo-priority[data-priority="urgent"],
.sw-notes-wrapper .todo-priority[data-priority="urgent"] {
    background: #f3e5f5 !important;
    color: #9c27b0 !important;
}

/* Priority Border Indicators - Universal */
.sw-notes-wp-editor .sw-todo-item[data-priority="urgent"],
.sw-notes-wrapper .sw-todo-item[data-priority="urgent"] {
    border-left-width: 4px !important;
    border-left-color: #9c27b0 !important;
}

.sw-notes-wp-editor .sw-todo-item[data-priority="high"],
.sw-notes-wrapper .sw-todo-item[data-priority="high"] {
    border-left-width: 4px !important;
    border-left-color: #f44336 !important;
}

.sw-notes-wp-editor .sw-todo-item[data-priority="normal"],
.sw-notes-wrapper .sw-todo-item[data-priority="normal"] {
    border-left-width: 4px !important;
    border-left-color: #ffc107 !important;
}

.sw-notes-wp-editor .sw-todo-item[data-priority="low"],
.sw-notes-wrapper .sw-todo-item[data-priority="low"] {
    border-left-width: 4px !important;
    border-left-color: #4CAF50 !important;
}

/* Completion Timestamp - Universal */
.sw-notes-wp-editor .todo-completed,
.sw-notes-wrapper .todo-completed {
    color: #4CAF50 !important;
    font-weight: 600 !important;
    background: rgba(76, 175, 80, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    user-select: none !important;
}

/* ContentEditable Controls - Universal */
.sw-notes-wp-editor [contenteditable="false"],
.sw-notes-wrapper [contenteditable="false"] {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: default !important;
    caret-color: transparent !important;
}

.sw-notes-wp-editor .todo-checkbox[contenteditable="false"],
.sw-notes-wrapper .todo-checkbox[contenteditable="false"],
.sw-notes-wp-editor .todo-priority[contenteditable="false"],
.sw-notes-wrapper .todo-priority[contenteditable="false"],
.sw-notes-wp-editor .todo-delete[contenteditable="false"],
.sw-notes-wrapper .todo-delete[contenteditable="false"] {
    cursor: pointer !important;
}

.sw-notes-wp-editor .todo-title[contenteditable="true"],
.sw-notes-wrapper .todo-title[contenteditable="true"],
.sw-notes-wp-editor .todo-description[contenteditable="true"],
.sw-notes-wrapper .todo-description[contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    cursor: text !important;
}

/* Placeholder Text Styling - Universal */
.sw-notes-wp-editor .todo-title[style*="italic"],
.sw-notes-wrapper .todo-title[style*="italic"],
.sw-notes-wp-editor .todo-description[style*="italic"],
.sw-notes-wrapper .todo-description[style*="italic"] {
    font-style: italic !important;
    color: #999 !important;
}

/* Animation Keyframes - Universal */
@keyframes todoComplete {
    0% { 
        background: #f8f9fa !important; 
        transform: scale(1) !important; 
    }
    50% { 
        background: #e8f5e8 !important; 
        transform: scale(1.02) !important; 
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
    }
    100% { 
        background: #f0f8f0 !important; 
        transform: scale(1) !important; 
    }
}

.sw-notes-wp-editor .sw-todo-item[style*="animation"],
.sw-notes-wrapper .sw-todo-item[style*="animation"] {
    animation-duration: 0.5s !important;
    animation-timing-function: ease !important;
    animation-fill-mode: forwards !important;
}

/* Mobile Responsive Styles - Universal */
@media (max-width: 768px) {
    .sw-notes-wp-editor .sw-todo-item,
    .sw-notes-wrapper .sw-todo-item {
        padding: 10px !important;
        margin: 10px 0 !important;
    }
    
    .sw-notes-wp-editor .todo-header,
    .sw-notes-wrapper .todo-header {
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
    
    .sw-notes-wp-editor .todo-title,
    .sw-notes-wrapper .todo-title {
        font-size: 15px !important;
        min-width: 200px !important;
    }
    
    .sw-notes-wp-editor .todo-description,
    .sw-notes-wrapper .todo-description {
        font-size: 13px !important;
        min-height: 35px !important;
        padding: 6px !important;
    }
    
    .sw-notes-wp-editor .todo-footer,
    .sw-notes-wrapper .todo-footer {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    
    .sw-notes-wp-editor .todo-checkbox,
    .sw-notes-wrapper .todo-checkbox {
        width: 18px !important;
        height: 18px !important;
        line-height: 14px !important;
        font-size: 12px !important;
    }
    
    .sw-notes-wp-editor .todo-priority,
    .sw-notes-wrapper .todo-priority {
        font-size: 11px !important;
        padding: 3px 6px !important;
    }
}

/* Very Small Screens - Universal */
@media (max-width: 480px) {
    .sw-notes-wp-editor .sw-todo-item,
    .sw-notes-wrapper .sw-todo-item {
        padding: 8px !important;
        margin: 8px 0 !important;
    }
    
    .sw-notes-wp-editor .todo-header,
    .sw-notes-wrapper .todo-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    .sw-notes-wp-editor .todo-title,
    .sw-notes-wrapper .todo-title {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .sw-notes-wp-editor .todo-priority,
    .sw-notes-wrapper .todo-priority {
        align-self: flex-end !important;
    }
}

/* Print Styles - Universal */
@media print {
    .sw-notes-wp-editor .sw-todo-item,
    .sw-notes-wrapper .sw-todo-item {
        break-inside: avoid !important;
        margin: 6px 0 !important;
        padding: 6px !important;
        border: 1px solid #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .sw-notes-wp-editor .todo-delete,
    .sw-notes-wrapper .todo-delete,
    .sw-notes-wp-editor .todo-actions,
    .sw-notes-wrapper .todo-actions {
        display: none !important;
    }
    
    .sw-notes-wp-editor .todo-checkbox,
    .sw-notes-wrapper .todo-checkbox {
        border: 1px solid #333 !important;
        background: white !important;
    }
    
    .sw-notes-wp-editor .todo-description,
    .sw-notes-wrapper .todo-description {
        border: none !important;
        background: transparent !important;
        padding: 4px 0 !important;
    }
}

/* High Contrast Mode Support - Universal */
@media (prefers-contrast: high) {
    .sw-notes-wp-editor .sw-todo-item,
    .sw-notes-wrapper .sw-todo-item {
        border-width: 3px !important;
        border-color: #000 !important;
    }
    
    .sw-notes-wp-editor .todo-checkbox,
    .sw-notes-wrapper .todo-checkbox {
        border-width: 3px !important;
        border-color: #000 !important;
    }
    
    .sw-notes-wp-editor .todo-priority,
    .sw-notes-wrapper .todo-priority {
        border: 2px solid currentColor !important;
    }
}

/* Reduced Motion Support - Universal */
@media (prefers-reduced-motion: reduce) {
    .sw-notes-wp-editor .sw-todo-item,
    .sw-notes-wrapper .sw-todo-item,
    .sw-notes-wp-editor .todo-checkbox,
    .sw-notes-wrapper .todo-checkbox,
    .sw-notes-wp-editor .todo-title,
    .sw-notes-wrapper .todo-title,
    .sw-notes-wp-editor .todo-description,
    .sw-notes-wrapper .todo-description,
    .sw-notes-wp-editor .todo-priority,
    .sw-notes-wrapper .todo-priority,
    .sw-notes-wp-editor .todo-delete,
    .sw-notes-wrapper .todo-delete {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark Mode Support - Universal */
.sw-notes-wrapper[data-theme="dark"] .sw-todo-item {
    background: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e1e1e1 !important;
}

.sw-notes-wrapper[data-theme="dark"] .todo-title,
.sw-notes-wrapper[data-theme="dark"] .todo-description {
    background: #1a1a1a !important;
    border-color: #555 !important;
    color: #e1e1e1 !important;
}

.sw-notes-wrapper[data-theme="dark"] .todo-created {
    color: #b0b0b0 !important;
}

.sw-notes-wrapper[data-theme="dark"] .todo-checkbox {
    border-color: #4CAF50 !important;
}

.sw-notes-wrapper[data-theme="dark"] .todo-footer {
    color: #b0b0b0 !important;
}