﻿/* MODALS & MENUS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.modal {
    background: var(--note-bg);
    padding: 25px;
    border-radius: 12px;
    width: 400px;
    box-shadow: var(--shadow);
    border: 1px solid var(--grid-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--grid-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
}

.btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--grid-color);
    color: var(--text-color);
}

#context-menu {
    position: fixed;
    background: var(--note-bg);
    border: 1px solid var(--grid-color);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 0;
    display: none;
    z-index: 20001;
    min-width: 200px;
    overflow: hidden;
}

.ctx-section {
    padding: 10px;
    border-bottom: 1px solid var(--grid-color);
}

.ctx-section:last-child {
    border-bottom: none;
}

.ctx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ctx-row label {
    color: var(--text-color);
    opacity: 0.8;
}

.ctx-item {
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: 0.2s;
}

.ctx-item:hover {
    background: var(--accent-color);
    color: white;
}

.ctx-item svg {
    margin-right: 8px;
    width: 14px;
    height: 14px;
}

.ctx-more-trigger {
    padding: 8px 0;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    border-top: 1px solid var(--grid-color);
    background: rgba(0, 0, 0, 0.02);
}

.ctx-more-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ctx-more-content {
    display: none;
    background: var(--bg-color);
}

.ctx-more-content.active {
    display: block;
}

input[type="color"].ctx-color-picker {
    width: 100%;
    height: 28px;
    border: 1px solid var(--grid-color);
    border-radius: 4px;
    padding: 0;
    background: none;
    cursor: pointer;
}

select.ctx-select {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid var(--grid-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
}

.fmt-bar {
    display: flex;
    gap: 2px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 4px;
    justify-content: center;
    margin-bottom: 8px;
}

.fmt-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
}

pointer-events: none;
}

/* MODALS & MENUS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.modal {
    background: var(--note-bg);
    padding: 25px;
    border-radius: 12px;
    width: 400px;
    box-shadow: var(--shadow);
    border: 1px solid var(--grid-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--grid-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
}

.btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--grid-color);
    color: var(--text-color);
}

#context-menu {
    position: fixed;
    background: var(--note-bg);
    border: 1px solid var(--grid-color);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 0;
    display: none;
    z-index: 20001;
    min-width: 200px;
    overflow: hidden;
}

.ctx-section {
    padding: 10px;
    border-bottom: 1px solid var(--grid-color);
}

.ctx-section:last-child {
    border-bottom: none;
}

.ctx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ctx-row label {
    color: var(--text-color);
    opacity: 0.8;
}

.ctx-item {
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: 0.2s;
}

.ctx-item:hover {
    background: var(--accent-color);
    color: white;
}

.ctx-item svg {
    margin-right: 8px;
    width: 14px;
    height: 14px;
}

.ctx-more-trigger {
    padding: 8px 0;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    cursor: pointer;
    border-top: 1px solid var(--grid-color);
    background: rgba(0, 0, 0, 0.02);
}

.ctx-more-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ctx-more-content {
    display: none;
    background: var(--bg-color);
}

.ctx-more-content.active {
    display: block;
}

input[type="color"].ctx-color-picker {
    width: 100%;
    height: 28px;
    border: 1px solid var(--grid-color);
    border-radius: 4px;
    padding: 0;
    background: none;
    cursor: pointer;
}

select.ctx-select {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid var(--grid-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
}

.fmt-bar {
    display: flex;
    gap: 2px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 4px;
    justify-content: center;
    margin-bottom: 8px;
}

.fmt-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
}

.fmt-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.fmt-btn.active {
    background: var(--accent-color);
    color: white;
}


/* Hotkey Editor */
.hotkey-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--grid-color);
}

.hotkey-row:last-child {
    border-bottom: none;
}

.hotkey-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.hotkey-val {
    background: var(--bg-color);
    border: 1px solid var(--grid-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    cursor: pointer;
    min-width: 60px;
    text-align: center;
}

.hotkey-val:hover {
    border-color: var(--accent-color);
}

.hotkey-val.rebinding {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

