/* Editor-specific styles for Steampunk Map */

/* Edit toggle buttons */
.edit-toggle-btn {
    position: absolute;
    top: 10px;
    background: rgba(26, 26, 46, 0.9);
    color: #e0d9c8;
    border: 1px solid #8b7355;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 13px;
    z-index: 2;
}

.edit-toggle-btn:hover {
    background: rgba(46, 46, 66, 0.95);
}

#edit-toggle {
    right: 50px;
}

#edit-toggle.active {
    background: rgba(139, 69, 19, 0.9);
    border-color: #d4af37;
    color: #f0e68c;
}

#edit-land-toggle {
    right: 280px;
}

#edit-land-toggle.active {
    background: rgba(180, 60, 60, 0.9);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

#edit-regions-toggle {
    right: 160px;
}

#edit-regions-toggle.active {
    background: rgba(46, 139, 87, 0.9);
    border-color: #90ee90;
    color: #90ee90;
}

/* Edit mode indicators */
.edit-mode-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(139, 69, 19, 0.9);
    color: #f0e68c;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 12px;
    z-index: 2;
    display: none;
}

.region-edit-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 139, 87, 0.9);
    color: #90ee90;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 12px;
    z-index: 2;
    display: none;
}

.land-edit-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(180, 60, 60, 0.9);
    color: #ff6b6b;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 12px;
    z-index: 2;
    display: none;
}

/* Editor dialogs */
.editor-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid #8b7355;
    border-radius: 6px;
    padding: 20px;
    color: #e0d9c8;
    font-family: sans-serif;
    z-index: 10;
    min-width: 280px;
    display: none;
}

.editor-dialog h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

#city-editor h3 {
    color: #f0e68c;
}

#region-editor h3 {
    color: #90ee90;
}

#subtraction-editor h3 {
    color: #ff6b6b;
}

#region-editor {
    min-width: 300px;
}

.editor-dialog label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #aaa;
}

.editor-dialog input,
.editor-dialog select {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #1a1a2e;
    color: #e0d9c8;
    font-size: 14px;
    box-sizing: border-box;
}

.btn-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.editor-dialog button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-save {
    background: #2e8b57;
    color: white;
}

.btn-cancel {
    background: #555;
    color: #e0d9c8;
}

.btn-delete {
    background: #8b0000;
    color: white;
}

/* JSON modal */
#json-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
}

#json-modal-content {
    background: rgba(26, 26, 46, 0.98);
    border: 1px solid #8b7355;
    border-radius: 6px;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
}

#json-modal h3 {
    margin: 0 0 10px 0;
    color: #f0e68c;
    font-family: sans-serif;
}

#json-modal textarea {
    flex: 1;
    min-height: 400px;
    background: #0a0a1a;
    color: #e0d9c8;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 12px;
    font-family: monospace;
    font-size: 12px;
    resize: none;
}

#json-modal .btn-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

#json-modal button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-copy {
    background: #2e8b57;
    color: white;
}

.btn-close {
    background: #555;
    color: #e0d9c8;
}

/* Region toolbar and land subtraction toolbar */
#region-toolbar,
#land-toolbar {
    position: absolute;
    top: 50px;
    right: 10px;
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid #8b7355;
    border-radius: 4px;
    padding: 8px;
    z-index: 2;
    display: none;
    font-family: sans-serif;
    font-size: 12px;
    color: #e0d9c8;
}

#region-toolbar button,
#land-toolbar button {
    display: block;
    width: 100%;
    padding: 6px 12px;
    margin-bottom: 4px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #1a1a2e;
    color: #e0d9c8;
    cursor: pointer;
    font-size: 12px;
}

#region-toolbar button:last-child,
#land-toolbar button:last-child {
    margin-bottom: 0;
}

#region-toolbar button:hover,
#land-toolbar button:hover {
    background: #2a2a4e;
}

#region-toolbar button.active,
#land-toolbar button.active {
    background: #2e8b57;
    border-color: #90ee90;
}

#region-toolbar .info,
#land-toolbar .info {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #555;
    font-size: 11px;
    color: #aaa;
}
