/* Dict Editor Page — all rules scoped to .editor-window root. */

.editor-window {
    background-color: #EAEAEA;
    border-radius: 16px;
    width: 720px;
    padding: 25px 25px 20px 25px;
    animation: fadeIn 0.3s ease-out;
}

.editor-window .window-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

/* Top controls */
.editor-window .top-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 14px;
}

.editor-window .control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-window .control-group label {
    font-weight: 500;
    color: #555;
}

.editor-window .search-wrapper {
    display: flex;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    background: #fff;
    height: 28px;
    width: 140px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.editor-window .search-wrapper:focus-within {
    border-color: #4d49fc;
}

.editor-window .search-wrapper input {
    border: none;
    outline: none;
    width: 100%;
    padding: 0 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.editor-window .search-wrapper button {
    background: #f0f0f0;
    border: none;
    border-left: 1px solid #ccc;
    width: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.editor-window .search-wrapper button:hover {
    background: #e0e0e0;
}

.editor-window .input-name {
    border: 1.5px solid #ccc;
    border-radius: 6px;
    height: 28px;
    padding: 0 8px;
    width: 160px;
    outline: none;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.editor-window .input-name:focus {
    border-color: #4d49fc;
}

/* Panels */
.editor-window .panels-wrapper {
    display: flex;
    gap: 12px;
    height: 320px;
    position: relative;
    margin-bottom: 15px;
}

.editor-window .panel {
    flex: 1;
    background-color: #fff;
    border: 1.5px solid #c5c5e0;
    border-radius: 10px;
    padding: 10px;
    overflow-y: auto;
}

/* Concept list */
.editor-window .concept-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.editor-window .concept-item {
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.15s;
    color: #333;
}

.editor-window .concept-item:hover {
    background: #f0eeff;
}

.editor-window .concept-item.active {
    background-color: #28209c;
    color: #fff;
}

.editor-window .add-concept-btn {
    background-color: #4d49fc;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

.editor-window .add-concept-btn:hover {
    background-color: #28209c;
}

/* Definition panel */
.editor-window .definition-area {
    width: 100%;
    height: calc(100% - 10px);
    border: none;
    outline: none;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #333;
    resize: none;
    padding: 5px;
    background: transparent;
}

.editor-window .definition-placeholder {
    color: #999;
    font-size: 14px;
    padding: 5px;
    font-style: italic;
}

/* Editor connector between panels */
.editor-window .editor-connector {
    display: flex;
    align-items: center;
    width: 20px;
    flex-shrink: 0;
    justify-content: center;
    align-self: flex-start;
    margin-top: 40px;
}

.editor-window .editor-connector-line {
    width: 100%;
    height: 2px;
    background: #28209c;
    position: relative;
}

.editor-window .editor-connector-line::before,
.editor-window .editor-connector-line::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #28209c;
    border-radius: 50%;
}

.editor-window .editor-connector-line::before { left: -4px; }
.editor-window .editor-connector-line::after { right: -4px; }

/* Inline concept editing */
.editor-window .concept-edit-input {
    border: 1.5px solid #4d49fc;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    width: 100%;
    background: #fff;
}

/* Bottom actions */
.editor-window .bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
}

.editor-window .editor-action-row {
    display: flex;
    align-items: center;
}

.editor-window .row-1 {
    justify-content: space-between;
}

.editor-window .row-2 {
    justify-content: center;
    gap: 12px;
}

.editor-window .sort-controls {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

/* Pill-shaped buttons */
.editor-window .btn-ui {
    background-color: #4d49fc;
    color: #ffffff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    height: 32px;
    transition: background 0.2s ease;
}

.editor-window .btn-ui:hover {
    background-color: #28209c;
}

.editor-window .btn-bold {
    font-weight: 700;
    padding: 0 16px;
    font-size: 13px;
}

.editor-window .btn-icon-sq {
    width: 44px;
    padding: 0;
}

.editor-window .btn-text {
    padding: 0 20px;
    gap: 6px;
}

.editor-window .btn-wide {
    width: 300px;
}

/* Error message */
.editor-window .editor-error {
    background: #fee;
    border: 1px solid #e88;
    border-radius: 8px;
    color: #c00;
    font-size: 13px;
    padding: 8px 14px;
    text-align: center;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease-out;
}

/* Success message */
.editor-window .editor-success {
    background: #efe;
    border: 1px solid #8c8;
    border-radius: 8px;
    color: #060;
    font-size: 13px;
    padding: 8px 14px;
    text-align: center;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease-out;
}
