#editor-container.drag-over {
    background-color: var(--bg-light);
    border: 2px dashed var(--border-color);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.status-indicator.active {
    background-color: #374151 !important;
    border: 1px solid #4b5563 !important;
    color: white !important;
}

.status-indicator.inactive {
    background-color: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-dark) !important;
    opacity: 0.6 !important;
}

.status-indicator:hover {
    background-color: var(--bg-editor);
    border-color: var(--active-blue);
}

.status-icon {
    margin-right: 4px;
    font-size: 10px;
}

.status-text {
    font-weight: 600;
    color: var(--text-light);
}

#find-all-tabs-modal {
    padding: 20px;
}

#find-all-tabs-modal .bg-\[var\(--bg-dark\)\] {
    max-height: calc(100vh - 40px);
}

.find-all-tabs-results-container {
    overflow-y: auto;
    max-height: 400px;
    padding: 16px;
    padding-right: 8px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-light);
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.find-all-tabs-results-container::-webkit-scrollbar {
    width: 8px;
}

.find-all-tabs-results-container::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.find-all-tabs-results-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    border: 1px solid var(--bg-light);
}

.find-all-tabs-results-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-dark);
}

.find-all-tabs-results-container::-webkit-scrollbar-corner {
    background: var(--bg-light);
}

.find-all-tabs-result-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.find-all-tabs-result-item:hover {
    background-color: var(--bg-light);
}

.find-all-tabs-result-item:last-child {
    border-bottom: none;
}

.find-all-tabs-file-header {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
    padding: 4px 0;
}

.find-all-tabs-match-line {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-dark);
    margin-left: 16px;
    line-height: 1.4;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    margin-bottom: 2px;
}

.find-all-tabs-match-line:hover {
    background-color: var(--bg-light);
}

.find-all-tabs-highlight {
    background-color: #fbbf24;
    color: #000;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

body.ui-locked #main-content > *:not(#lock-screen):not(#search-replace-modal) {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}
body.ui-locked .unlock-modal,
body.ui-locked .unlock-modal *,
body.ui-locked input#un-pwd,
body.ui-locked input#code {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
}

.temporary-highlight {
    background-color: #fbbf24 !important;
    color: #000 !important;
    padding: 1px 2px !important;
    border-radius: 2px !important;
    font-weight: 600 !important;
    animation: highlightPulse 3s ease-in-out;
}

@keyframes highlightPulse {
    0% { 
        background-color: #fbbf24; 
        transform: scale(1);
    }
    50% { 
        background-color: #f59e0b; 
        transform: scale(1.02);
    }
    100% { 
        background-color: transparent; 
        transform: scale(1);
    }
}

#note-editor.highlighting-search-term {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4) !important;
    transition: all 0.3s ease !important;
}

#note-editor.highlighting-search-term::selection {
    background-color: #fbbf24 !important;
    color: #000 !important;
}

#note-editor.highlighting-search-term::-moz-selection {
    background-color: #fbbf24 !important;
    color: #000 !important;
}

#note-editor.highlighting-search-term::-webkit-selection {
    background-color: #fbbf24 !important;
    color: #000 !important;
}

.find-all-tabs-summary {
    background-color: var(--bg-light);
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-light);
}

#search-overlay.hidden { display: none !important; }

#search-overlay button { width: 100%; }
#search-overlay input { width: 100%; }
#search-overlay .search-overlay-footer label { white-space: nowrap; }

@media (max-width: 768px) {
    #find-all-tabs-modal {
        padding: 8px;
    }
    
    #find-all-tabs-modal .bg-\[var\(--bg-dark\)\] {
        max-height: calc(100vh - 16px);
        max-width: calc(100vw - 16px);
        width: calc(100vw - 16px);
        display: flex;
        flex-direction: column;
    }
    
    #find-all-tabs-modal .flex.items-center.space-x-4 {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }
    
    #find-all-tabs-modal .flex.items-center.space-x-4 input {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }
    
    #find-all-tabs-modal .flex.items-center.space-x-4 label {
        justify-content: flex-start;
        width: auto;
        margin: 0;
        white-space: nowrap;
    }
    
    #find-all-tabs-modal .flex.items-center.space-x-4 button {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
    }
    
    .find-all-tabs-results-container {
        max-height: calc(60vh);
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    #document-list {
        overscroll-behavior-x: contain;
        touch-action: pan-y;
    }
    
    .find-all-tabs-match-line {
        font-size: 11px;
        margin-left: 8px;
        padding: 3px 4px;
        touch-action: manipulation;
    }
    
    .find-all-tabs-file-header {
        font-size: 13px;
    }
    
    .find-all-tabs-result-item {
        padding: 6px 8px;
        touch-action: manipulation;
    }
    
    #status-markdown-preview {
        display: none !important;
    }
    
    #markdown-preview {
        display: none !important;
    }
    
    #search-overlay:not(.hidden) {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        z-index: 1000 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    #search-overlay .flex.flex-col.space-y-2 {
        gap: 8px;
    }
    
    #search-overlay input {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 16px !important;
        padding: 8px !important;
        flex: 1 1 100% !important;
    }
    
    #search-overlay button {
        padding: 10px 12px !important;
        font-size: 16px !important;
    }

    #search-overlay .flex.items-center.space-x-2 {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
    }

    #search-overlay .flex.items-center.space-x-2 label {
        width: auto !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }

    /* space-x-2'nin bıraktığı sol/sağ boşlukları mobilde kaldır */
    #search-overlay .flex.items-center.space-x-2 > :not([hidden]) ~ :not([hidden]) {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    @media (max-width: 768px) {
        #main-nav {
            flex-wrap: wrap;
            overflow: hidden;
        }

        #more-nav-dropdown {
            left: auto;
            right: 0;
        }
    }

    /* Replace satırını grid yap: input tam satır, butonlar yan yana */
    #search-overlay .flex.flex-col.space-y-2 > div:nth-of-type(2) {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        align-items: stretch !important;
    }
    #search-overlay #search-replace { grid-column: 1 / -1 !important; }
    #search-overlay #replace-one, 
    #search-overlay #replace-all { width: 100% !important; }
    
    #tabs-container {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: none;
    }
    
    #tabs-container::-webkit-scrollbar {
        display: none;
    }
    
    #footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 999 !important;
        height: auto !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 4px 8px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        border-top: 1px solid var(--border-color) !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2) !important;
        padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 4px !important;
    }
    
    #footer::-webkit-scrollbar {
        display: none !important;
    }
    
    #footer > div {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
    }
    
    #footer > div:first-child {
        flex: 0 0 auto !important;
    }
    
    #footer > div:last-child {
        flex: 0 0 auto !important;
        margin-left: auto !important;
    }
    
    #footer #status-length,
    #footer #status-lines {
        display: none !important;
    }
    
    #footer #status-cursor {
        display: none !important;
    }
    
    #footer > div:last-child > span:not(.status-indicator) {
        display: none !important;
    }
    
    #footer .status-indicator {
        flex-shrink: 0 !important;
        min-width: 28px !important;
        padding: 3px 5px !important;
        font-size: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    #footer .status-icon {
        font-size: 11px !important;
        margin-right: 2px !important;
        line-height: 1 !important;
    }
    
    #footer .status-text {
        font-size: 8px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
    }
    
    #footer #status-markdown-preview {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    #editor-wrapper,
    #main-editor {
        padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
    }
    
    #note-editor,
    #line-numbers {
        max-height: calc(100vh - 160px) !important;
        padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
    }
    
    #editor-container.split-view #markdown-preview {
        max-height: calc(100vh - 160px) !important;
        padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
    }
    
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        #footer {
            padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
        }
        
        #editor-wrapper,
        #main-editor {
            padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
        }
        
        #note-editor,
        #line-numbers {
            max-height: calc(100vh - calc(160px + env(safe-area-inset-bottom))) !important;
            padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
        }
        
        #editor-container.split-view #markdown-preview {
            max-height: calc(100vh - calc(160px + env(safe-area-inset-bottom))) !important;
            padding-bottom: max(44px, calc(44px + env(safe-area-inset-bottom))) !important;
        }
    }
    
    #note-editor {
        font-size: 16px !important;
        padding: 8px !important;
    }
    
    #line-numbers {
        width: 40px !important;
        font-size: 12px !important;
        padding: 8px 4px !important;
    }
    
    .bg-\[var\(--bg-dark\)\].px-2.py-1 {
        padding: 8px 12px !important;
    }
    
    .bg-\[var\(--bg-dark\)\].px-2.py-1 button {
        padding: 8px !important;
        font-size: 18px !important;
    }
    
    .bg-\[var\(--bg-dark\)\].px-2.py-1 svg {
        width: 20px !important;
        height: 20px !important;
    }
}

.table-cell.cell-selected-single {
    background-color: rgba(59, 130, 246, 0.15) !important;
    outline: 2px solid var(--accent, #3b82f6) !important;
    outline-offset: -2px !important;
    z-index: 1;
    position: relative;
}
