/* Note types and scopes */

.notes-type-manager-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.notes-type-manager-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.notes-type-filter,
.notes-type-assign-select,
.notes-scope-type-select,
.notes-scope-entity-select {
    min-width: 0;
    padding: 4px 7px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
}

.notes-type-filter {
    flex: 1;
}

.notes-type-inline-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
}

.notes-type-inline-control > span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.notes-scope-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notes-scope-badges {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.note-scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 150px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.note-scope-more {
    background: #f1f5f9;
    color: #64748b;
}

.note-scope-badge-removable {
    padding-right: 3px;
}

.note-scope-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #60a5fa;
    cursor: pointer;
}

.note-scope-remove:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.notes-scope-add-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.notes-scope-add-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
}

.notes-scope-add-btn:hover {
    background: #2563eb;
}

.notes-type-manager {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.notes-type-manager-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
}

.notes-type-manager-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 80px);
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.notes-type-manager-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.notes-type-manager-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.notes-type-manager-subtitle,
.notes-type-manager-message {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}

.notes-type-manager-message {
    min-height: 18px;
    margin: 0;
    padding: 0 20px 12px;
}

.notes-type-manager-message.success {
    color: #059669;
}

.notes-type-manager-message.error {
    color: #dc2626;
}

.notes-type-manager-close,
.notes-type-row-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.notes-type-manager-close:hover,
.notes-type-row-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.notes-type-row-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.notes-type-manager-list {
    overflow-y: auto;
    padding: 12px 20px 0;
}

.notes-type-row,
.notes-type-create-row {
    display: grid;
    grid-template-columns: 40px 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}

.notes-type-create-row {
    padding: 14px 20px 18px;
    border-top: 1px solid #f1f5f9;
}

.notes-type-color {
    width: 34px;
    height: 30px;
    padding: 0;
    border: none;
    background: transparent;
}

.notes-type-name {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
}

.notes-type-lock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.notes-type-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border: none;
    border-radius: 7px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
