/*

This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.

If your plugin does not need CSS, delete this file.

*/

.notice-title {
    font-weight: bold;
}

.confirm-modal-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.info-paragraph {
    white-space: pre-line;
}

.yes-button {
    margin-right: 10px;
}

/*
search
*/

.local-search-modal {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-height: 90vh;
    padding-top: 10vh;
}

.search-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.search-area {
    flex-shrink: 0;
    padding-bottom: 8px;
}

.search-results-container {
    flex: 1;
    position: relative;
    overflow-y: auto;
    min-height: 0;
    padding-left: 8px;
    padding-right: 8px;
    font-size: 0.9em;
}

.search-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 2px;
}

.search-input-container-ex {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.btn-controls {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1px;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.mode-controls {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1px;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.search-input {
    width: 100%;
    padding-left: 30px !important;
    padding-right: 50px !important;
}

.search-mode-button,
.clear-button,
.case-sensitive-button {
    background: none !important;
    border: none !important;
    padding: 2px 5px !important;
    cursor: pointer;
    z-index: 2;
    box-shadow: none !important;
    background-color: transparent !important;
    min-height: unset !important;
    min-width: unset !important;
    color: var(--text-muted);
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    outline: none !important;
}

.search-mode-button:hover,
.clear-button:hover,
.case-sensitive-button:hover {
    background-color: transparent !important;
    color: var(--text-accent);
}

.clear-button:active,
.case-sensitive-button:active,
.clear-button:focus,
.case-sensitive-button:focus {
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
}

.case-sensitive-inactive {
    opacity: 0.6;
    font-weight: normal;
}

.case-sensitive-active {
    opacity: 1;
    font-weight: bold;
}

.search-button {
    margin-left: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
}

.search-icon {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
}

.search-icon-handle {
    position: absolute;
    width: 6px;
    height: 2px;
    background-color: currentColor;
    bottom: -2px;
    right: -2px;
    transform: rotate(45deg);
    transform-origin: right bottom;
}

.advanced-toggle {
    margin-left: 0px;
    padding: 4px 8px;
    background: none;
    border: none;
}

.advanced-search-panel {
    margin-bottom: 4px;
    border-radius: 4px;
    padding: 8px;
    background-color: var(--background-secondary);
}

.type-container,
.folder-container,
.date-range-container,
.search-method-container {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 4px;
    width: 100%;
}

.type-select,
.folder-select,
.search-method-select {
    flex-grow: 1;
    min-width: 0;
}

.search-label {
    min-width: 50px;
}

.folder-container .search-label {
    width: 50px;
    flex-shrink: 0;
}

.folder-container select {
    flex: 1 1 auto !important;
    min-width: 0;
    width: auto !important;
}

.dates-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    width: auto !important;
}

.date-input-ex {
    width: 100%;
    padding-right: 2px !important;
    border: 1px solid var(--background-modifier-border);
    border-radius: 4px;
    background-color: var(--background-primary);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-results-title {
    font-size: 1.1em;
    color: var(--text-muted);
}

.results-count {
    color: var(--text-muted);
}

.results-menu-button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    font-size: 7px;
    line-height: 1;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.results-menu-button:hover {
    background-color: var(--background-modifier-hover);
    color: var(--text-normal);
}

.results-menu-button:active {
    background-color: var(--background-modifier-active);
}

.search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-item {
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--background-modifier-border);
    cursor: pointer;
}

.search-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: nowrap;
    width: 100%;
}


.search-content {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 4px;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    overflow: hidden;
}

.search-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 50%;
    max-width: 80%;
}

.search-item-time {
    font-size: 0.8em;
    color: var(--text-faint);
    white-space: nowrap;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.search-item-path {
    font-size: 0.85em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7;
    flex: 1;
    min-width: 0;
}

.search-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    gap: 10px;
}

.search-item-type {
    font-size: 0.8em;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.keyword-highlight {
    font-weight: bold;
    color: var(--text-accent);
}

.search-highlight-title {
    color: var(--text-accent);
}

.search-highlight-content {
    color: var(--interactive-accent);
}

.clickable {
    cursor: pointer;
}

.clickable:hover {
    background-color: var(--background-modifier-hover);
}

/* Remote Note Viewer Modal */
.remote-note-viewer-modal {
    max-width: 90vw;
    max-height: 90vh;
    height: 90vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.remote-note-viewer-modal .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.remote-note-header {
    flex-shrink: 0;
    padding: 16px;
    border-bottom: 1px solid var(--background-modifier-border);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remote-note-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.remote-note-header-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.remote-note-header-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    min-width: fit-content;
}

.remote-note-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: var(--text-accent);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remote-note-path-info {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-muted);
}

.remote-note-path-info span {
    margin-right: 8px;
}

.remote-note-path-info code {
    background: var(--background-modifier-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-monospace);
    font-size: 0.85em;
}

.remote-note-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.remote-note-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.remote-note-markdown-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--background-primary);
    scroll-margin-top: 60px;
}

.remote-note-markdown-content,
.remote-note-markdown-content * {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

.remote-note-markdown-content ::selection {
    background-color: var(--text-selection);
}

.remote-note-markdown-content ::-moz-selection {
    background-color: var(--text-selection);
    color: var(--text-on-accent);
}

.remote-note-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.remote-note-action-btn {
    padding: 4px 8px;
    border: 1px solid var(--background-modifier-border);
    background: var(--background-secondary);
    color: var(--text-normal);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.remote-note-action-btn:hover {
    background: var(--background-modifier-hover);
    border-color: var(--text-accent);
}

.remote-note-error {
    padding: 24px;
    text-align: center;
    color: var(--text-error);
}

.remote-note-error h3 {
    margin: 0 0 12px 0;
    color: var(--text-error);
}

.remote-note-error p {
    margin: 0 0 16px 0;
    color: var(--text-muted);
}

.remote-note-retry-btn {
    padding: 8px 16px;
    background: var(--interactive-accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.remote-note-retry-btn:hover {
    background: var(--interactive-accent-hover);
}

.keyword-highlight {
    background-color: var(--text-highlight-bg);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
}

.keyword-highlight.current-highlight {
    background-color: var(--text-accent);
    color: rgba(8, 155, 240, 0.7);
    box-shadow: 0 0 8px var(--text-accent);
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.keyword-highlight.keyword-0 {
    background-color: rgba(255, 235, 59, 0.3);
    border-left: 3px solid #FBC02D;
}

.keyword-highlight.keyword-1 {
    background-color: rgba(76, 175, 80, 0.3);
    border-left: 3px solid #388E3C;
}

.keyword-highlight.keyword-2 {
    background-color: rgba(33, 150, 243, 0.3);
    border-left: 3px solid #1976D2;
}

.keyword-highlight.keyword-3 {
    background-color: rgba(156, 39, 176, 0.3);
    border-left: 3px solid #7B1FA2;
}

.keyword-highlight.keyword-4 {
    background-color: rgba(255, 87, 34, 0.3);
    border-left: 3px solid #E64A19;
}

.keyword-nav-btn {
    background: var(--interactive-accent) !important;
    color: var(--text-on-accent) !important;
    border: 2px solid var(--interactive-accent) !important;
    font-weight: 600 !important;
    position: relative;
}

.keyword-nav-btn:hover {
    background: var(--interactive-accent-hover) !important;
    border-color: var(--interactive-accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.keyword-nav-btn:before {
    content: "🔍";
    margin-right: 6px;
}

/* Search Usage Tips */
.search-usage-tips {
    padding: 16px;
    margin: 16px 0;
    background: var(--background-secondary);
    border-radius: 6px;
}

.usage-tips-title {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--text-faint);
}

.usage-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.usage-tip-item {
    padding: 4px 0;
    color: var(--text-faint);
    line-height: 1.3;
    font-size: 0.85em;
}

.usage-tip-item code {
    background: var(--background-primary-alt);
    color: var(--text-accent);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: var(--font-monospace);
}