/* editor-notes.css */
/* Version: 1.0.0 */
/* Styling for editor notes button and panel */

/* Editor notes button styling */
.editor-notes-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #E3F2FD;
    border: 1px solid #90CAF9;
    border-radius: 4px;
    padding: 4px 6px;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.editor-notes-button svg {
    width: 14px;
    height: 14px;
    stroke: #1976D2;
    transition: stroke 0.2s ease;
}

.editor-notes-button:hover {
    background-color: #BBDEFB;
    border-color: #64B5F6;
    transform: scale(1.1);
}

.editor-notes-button:hover svg {
    stroke: #0D47A1;
}

.editor-notes-button:active {
    transform: scale(0.95);
}

.editor-notes-button.active {
    background-color: #90CAF9;
    border-color: #42A5F5;
}

.editor-notes-button.active svg {
    stroke: #0D47A1;
}

/* Inline version for block layout */
.editor-notes-button.inline-editor-notes {
    margin-left: 6px;
    margin-right: 6px;
}

/* Panel container */
.editor-notes-panel {
    position: absolute;
    width: 400px;
    max-width: 90vw;
    background: white;
    border: 2px solid #64B5F6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.3);
    z-index: 10001; /* Above mesora popup */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel header */
.editor-notes-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #E3F2FD, #BBDEFB);
    border-bottom: 1px solid #64B5F6;
    border-radius: 6px 6px 0 0;
}

.editor-notes-panel-title {
    font-weight: bold;
    font-size: 14px;
    color: #0D47A1;
    direction: rtl;
    text-align: right;
}

.editor-notes-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #1976D2;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.editor-notes-panel-close:hover {
    background-color: rgba(25, 118, 210, 0.1);
    color: #0D47A1;
}

.editor-notes-panel-close:active {
    transform: scale(0.9);
}

/* Panel content */
.editor-notes-panel-content {
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
}

/* Individual editor note item */
.editor-note-item {
    margin-bottom: 12px;
    padding: 12px;
    background: #F5F5F5;
    border-right: 4px solid #42A5F5;
    border-radius: 4px;
}

.editor-note-item:last-child {
    margin-bottom: 0;
}

/* When there are multiple notes */
.editor-note-item.multiple {
    margin-bottom: 16px;
}

/* Note number (for multiple notes) */
.editor-note-number {
    display: inline-block;
    background: #1976D2;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-bottom: 6px;
}

/* Note text */
.editor-note-text {
    font-family: 'SBL Hebrew', 'Ezra SIL', 'Arial', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #1a1a1a;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 8px;
}

/* Note metadata (last updated date) */
.editor-note-meta {
    font-size: 12px;
    color: #666;
    font-style: italic;
    border-top: 1px solid #E0E0E0;
    padding-top: 6px;
    margin-top: 8px;
}

/* Scrollbar styling for panel content */
.editor-notes-panel-content::-webkit-scrollbar {
    width: 8px;
}

.editor-notes-panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.editor-notes-panel-content::-webkit-scrollbar-thumb {
    background: #64B5F6;
    border-radius: 4px;
}

.editor-notes-panel-content::-webkit-scrollbar-thumb:hover {
    background: #42A5F5;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .editor-notes-panel {
        width: 95vw;
        max-width: none;
    }

    .editor-notes-panel-content {
        font-size: 14px;
        max-height: 300px;
        padding: 12px;
    }

    .editor-note-text {
        font-size: 14px;
    }

    .editor-notes-button {
        padding: 3px 5px;
    }

    .editor-notes-button svg {
        width: 12px;
        height: 12px;
    }
}

/* Print styles - hide panel and button when printing */
@media print {
    .editor-notes-panel,
    .editor-notes-button {
        display: none !important;
    }
}

/* Dark mode support (if implementing) */
@media (prefers-color-scheme: dark) {
    .editor-notes-button {
        background-color: #1E3A5F;
        border-color: #2979FF;
    }

    .editor-notes-button svg {
        stroke: #64B5F6;
    }

    .editor-notes-button:hover {
        background-color: #0D47A1;
        border-color: #448AFF;
    }

    .editor-notes-panel {
        background: #263238;
        border-color: #2979FF;
    }

    .editor-notes-panel-header {
        background: linear-gradient(to bottom, #1E3A5F, #0D47A1);
    }

    .editor-notes-panel-title {
        color: #BBDEFB;
    }

    .editor-notes-panel-close {
        color: #90CAF9;
    }

    .editor-notes-panel-content {
        color: #E0E0E0;
    }

    .editor-note-item {
        background: #37474F;
        border-right-color: #2979FF;
    }

    .editor-note-text {
        color: #F5F5F5;
    }

    .editor-note-meta {
        color: #BDBDBD;
        border-top-color: #546E7A;
    }
}
