/* =========================================
   ToolCanvas — Online Notepad Styles
   ========================================= */

:root {
    --toolbar-height: 48px;
    --menubar-height: 40px;
    --statusbar-height: 32px;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --border-light: #e2e8f0;
}

body {
    background-color: #f8fafc;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

/* Body override when notepad is maximized to prevent scrolling */
body.notepad-maximized-active {
    overflow: hidden !important;
}

/* ---------- Google AdSense Slots Layout ---------- */
.adsense-block {
    margin: 24px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.12);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.adsense-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    font-weight: 700;
}

.adsense-placeholder {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* ---------- Notepad Card Container ---------- */
.notepad-app-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 580px; /* Fixed height when embedded in page */
    position: relative;
    overflow: visible; /* Prevent dropdown clipping in embedded mode */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

/* Full Screen Maximized State */
.notepad-app-card.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* ---------- Notepad Card Header ---------- */
.notepad-card-header {
    height: 56px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
    z-index: 100; /* Float menus above editor content */
}


.nch-left, .nch-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hamburger-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.hamburger-btn:hover {
    background: #f1f5f9;
    color: var(--accent-blue);
}

/* ---------- Dropdown Menus ---------- */
.notepad-menubar {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
}

.menu-dropdown-container {
    position: relative;
    display: inline-block;
}

.btn-menu-trigger {
    background: transparent;
    border: none;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-menu-trigger:hover, .btn-menu-trigger.active {
    background-color: #e2e8f0;
}

/* Dropdown list popup card */
.menu-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    width: 220px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 10000;
    display: none;
    flex-direction: column;
    padding: 6px 0;
}

.menu-dropdown-list.show {
    display: flex;
}

.menu-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 6px 0;
}

.menu-item-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s;
}

.menu-item-btn:hover {
    background-color: #f1f5f9;
}

.menu-item-btn:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.shortcut-tip {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

/* Dropdown Sub-menus positioning */
.menu-submenu-parent {
    position: relative;
}

.menu-submenu-list {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: -2px;
    width: 180px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
    display: none;
    flex-direction: column;
    padding: 4px 0;
    z-index: 10010;
}

.menu-submenu-parent:hover .menu-submenu-list {
    display: flex;
}

.menu-item-btn.active {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--accent-blue);
    font-weight: 600;
}

.menu-item-btn.active::after {
    content: '✓';
    font-size: 12px;
    font-weight: 700;
}

/* Save status indicator */
.save-status-indicator {
    font-size: 11px;
    color: var(--text-secondary);
    background-color: #e2e8f0;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.save-status-indicator.saving {
    background-color: #fef3c7;
    color: #d97706;
}

.save-status-indicator.unsaved {
    background-color: #fee2e2;
    color: #dc2626;
}

.btn-action-icon {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.btn-action-icon:hover {
    background-color: #f1f5f9;
    color: var(--accent-blue);
}

/* ---------- Quick Formatting Toolbar ---------- */
.quick-toolbar {
    height: 48px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 6px;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-toolbar::-webkit-scrollbar {
    display: none;
}

.toolbar-btn {
    background: transparent;
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-size: 14px;
    font-weight: 600;
}

.toolbar-btn:hover {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

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

.toolbar-sep {
    width: 1px;
    height: 20px;
    background-color: var(--border-light);
    margin: 0 4px;
}

.quick-toolbar select {
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

/* ---------- Notepad Editor Workspace ---------- */
.notepad-workspace-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #ffffff;
}

.editor-scroll-container {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

textarea.notepad-editor {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
    border: none;
    outline: none;
    resize: none;
    margin: 0;
    padding: 40px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    caret-color: var(--text-primary);
    overflow-y: auto !important;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

textarea.notepad-editor::selection {
    background-color: rgba(37, 99, 235, 0.2) !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

textarea.notepad-editor::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
}

/* Custom Spellcheck Overlay */
.notepad-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    margin: 0;
    padding: 40px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-primary);
    pointer-events: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: transparent;
    overflow: hidden;
    z-index: 2;
}

/* Wavy Red Underline for Misspelled Words */
.misspelled {
    text-decoration: underline wavy #ef4444;
    text-decoration-skip-ink: none;
}

/* Spellcheck Context Menu Styles */
.spellcheck-context-menu {
    position: fixed;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 100500;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    font-family: 'Inter', sans-serif;
}

.spellcheck-context-menu.hidden {
    display: none;
}

.scm-item {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.15s;
    font-weight: 500;
    width: 100%;
}

.scm-item:hover {
    background-color: #f1f5f9;
}

.scm-suggestion-btn {
    color: var(--accent-blue) !important;
    font-weight: 600;
}

.scm-suggestion-btn:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
}

.scm-divider {
    height: 1px;
    background-color: var(--border-light);
    margin: 6px 0;
}

.scm-no-suggestions {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ---------- Find & Replace Overlay ---------- */
.find-replace-panel {
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 80;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.find-replace-panel.hidden {
    display: none;
}

.fr-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fr-field {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 180px;
}

.fr-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 50px;
}

.fr-field input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    outline: none;
    background-color: #ffffff;
}

.fr-field input[type="text"]:focus {
    border-color: var(--accent-blue);
}

.fr-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.btn-fr-action {
    background-color: #cbd5e1;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

.btn-fr-action:hover {
    background-color: var(--accent-blue);
    color: #ffffff;
}

.btn-fr-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    margin-left: 8px;
}

/* ---------- Status Bar ---------- */
.notepad-statusbar {
    height: 32px;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
    z-index: 10;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-separator {
    color: var(--border-light);
}

/* ---------- Drawer Menu ---------- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.08);
    z-index: 100010;
    display: flex;
    flex-direction: column;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.drawer.open {
    left: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.btn-close-drawer {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 4px;
}

.btn-close-drawer:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.drawer-item {
    width: 100%;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.drawer-item:hover {
    background-color: #f8fafc;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.drawer-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

/* Recent items container styling */
.recent-item-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.recent-board-btn {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    min-width: 0;
}

.recent-board-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.recent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-time {
    font-size: 10px;
    color: #94a3b8;
}

.btn-delete-recent {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.btn-delete-recent:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.empty-recent-msg {
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
    padding: 8px 4px;
}

/* ---------- Modals Overlay ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100200;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background: #ffffff;
    border-radius: 10px;
    width: 90%;
    max-width: 445px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalShow 0.2s ease;
}

.max-about-modal {
    max-width: 600px;
}

@keyframes modalShow {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #94a3b8;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    max-height: 65vh;
    overflow-y: auto;
}

/* Keyboard Shortcuts layout */
.shortcuts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shortcuts-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.shortcuts-list li:last-child {
    border-bottom: none;
}

.shortcuts-list .key {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Special Characters tabs & grids */
.char-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
    gap: 8px;
    overflow-x: auto;
}

.char-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.char-tab-btn:hover {
    color: var(--text-primary);
}

.char-tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.char-grid-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 6px;
}

.char-grid-container.active {
    display: grid;
}

.btn-char-cell {
    background-color: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-char-cell:hover {
    background-color: var(--accent-blue);
    color: #ffffff;
    transform: scale(1.08);
}

/* About modal details */
.about-modal-body {
    line-height: 1.6;
}

.about-section {
    margin-bottom: 20px;
}

.about-section h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 8px;
}

.about-section p {
    font-size: 13px;
    color: #475569;
}

.about-section ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: #475569;
}

.about-section li {
    margin-bottom: 6px;
}

/* ---------- Toast Notification ---------- */
.toast {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translate(-50%, 20px);
    background-color: #0f172a;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100300;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- SEO Article Layout ---------- */
.tool-article {
    margin-top: 48px;
    border-top: 1px solid var(--border-light);
    padding-top: 36px;
}

.tool-article h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tool-article h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tool-article p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tool-article ul {
    margin-bottom: 24px;
    padding-left: 24px;
}

.tool-article li {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.article-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.faq-container {
    margin-top: 16px;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 16px;
}

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

.faq-question {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.faq-answer {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

/* ---------- Print stylesheet overrides ---------- */
@media print {
    body, html {
        background-color: #ffffff !important;
        height: auto !important;
        overflow: visible !important;
    }
    .site-header, .site-footer, .breadcrumb, .tool-header, .adsense-block, .tool-article, .notepad-card-header, .quick-toolbar, .notepad-statusbar, .drawer, .drawer-overlay, .modal-overlay, #find-replace-panel {
        display: none !important;
    }
    .notepad-app-card {
        border: none !important;
        box-shadow: none !important;
        height: auto !important;
        overflow: visible !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
    }
    .notepad-workspace-container, .editor-scroll-container {
        overflow: visible !important;
        height: auto !important;
        width: 100% !important;
    }
    .notepad-editor-overlay {
        display: none !important;
    }
    textarea.notepad-editor {
        overflow: visible !important;
        height: auto !important;
        background: transparent !important;
        color: #000000 !important;
        -webkit-text-fill-color: #000000 !important;
        padding: 0 !important;
    }
}

.notepad-mobile-title {
    display: none;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

/* ---------- Responsive Layout Adjustments ---------- */
@media (max-width: 768px) {
    .notepad-mobile-title {
        display: block;
    }
    .notepad-menubar {
        display: none; /* Hide menubar options on small viewports */
    }
    .notepad-card-header {
        padding: 0 12px;
    }
    .notepad-app-card {
        height: 480px; /* shorter on mobile viewports */
    }
    .notepad-app-card.maximized {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
    }
    .notepad-editor-overlay {
        display: none !important;
    }
    textarea.notepad-editor {
        color: var(--notepad-text-color, #1e293b) !important;
        -webkit-text-fill-color: var(--notepad-text-color, #1e293b) !important;
    }
    .quick-toolbar > * {
        flex-shrink: 0;
    }
    .notepad-statusbar .status-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .quick-toolbar select {
        padding: 4px;
        font-size: 11px;
    }
    .fr-actions {
        justify-content: space-between;
        width: 100%;
    }
    .btn-fr-action {
        flex: 1;
        text-align: center;
        padding: 6px 4px;
        font-size: 11px;
    }
}
