/* BD-129: shared Objects dropdown + detail modal.
 * BD-155: rows/empty state use the shared --ln-cardmenu-* tokens (defined in
 * ai_canvas_enhanced.css) so Objects matches AI Quick Actions and Tags.
 * Fallbacks cover pages without the canvas stylesheet. */

.ln-note-objects-dd {
    min-width: 200px;
    max-width: 100%;
}

.ln-note-objects-dd-empty {
    padding: 8px 10px;
    text-align: left;
}

.ln-note-objects-dd-empty p {
    margin: 0 0 10px;
    font-size: var(--ln-cardmenu-font, 13px);
    color: var(--ln-cardmenu-muted, #64748b);
}

/* Footer-style action, mirroring the Tags add row. */
.ln-note-objects-dd-add {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--ln-cardmenu-accent, #2563eb);
    border-radius: var(--ln-cardmenu-row-radius, 7px);
    background: var(--ln-cardmenu-accent, #2563eb);
    color: #fff;
    font: inherit;
    font-size: var(--ln-cardmenu-font, 13px);
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.ln-note-objects-dd-add:hover {
    opacity: 0.9;
}

.ln-note-objects-dd-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ln-note-objects-dd-item {
    margin: 0;
}

.ln-note-objects-dd-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--ln-cardmenu-row-radius, 7px);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: var(--ln-cardmenu-font, 13px);
    line-height: 1.25;
    color: var(--ln-cardmenu-text, #334155);
}

.ln-note-objects-dd-row:hover,
.ln-note-objects-dd-row:focus-visible {
    background: var(--ln-cardmenu-hover, rgba(100, 116, 139, 0.12));
    outline: none;
}

.ln-note-objects-dd-row > i {
    width: 1em;
    text-align: center;
    color: var(--ln-cardmenu-muted, #64748b);
    flex-shrink: 0;
}

.ln-note-objects-dd-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ln-note-object-detail {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    padding: 16px;
}

.ln-note-object-detail[hidden] {
    display: none !important;
}

.ln-note-object-detail-card {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 12px;
    padding: 20px 20px 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.ln-note-object-detail-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.ln-note-object-detail-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 28px 14px 0;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    text-transform: capitalize;
}

.ln-note-object-detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #6b7280;
}

.ln-note-object-detail-field input,
.ln-note-object-detail-field textarea {
    font: inherit;
    font-size: 14px;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
}

.ln-note-object-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.ln-note-object-detail-btn {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #6366f1;
    background: #6366f1;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.ln-note-object-detail-btn--ghost {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
