/* Editor Page Styles */

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--light);
}

.editor-header {
    background: var(--primary);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.editor-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.editor-main {
    display: flex;
    flex: 1;
    gap: 0;
    overflow: hidden;
}

.editor-left {
    width: 40%;
    background: white;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    padding: 1rem;
}

.editor-right {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.editor-map {
    flex: 1;
    z-index: 1;
}

.map-status {
    padding: 0.75rem 1rem;
    background: #ecf0f1;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Sections */
.editor-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.editor-section:last-child {
    border-bottom: none;
}

.editor-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Form Styles */
.form-control,
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-control {
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
    font-size: 0.9rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row .form-group.half {
    margin-bottom: 0;
}

.help-text {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.4rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    flex: 1;
}

.btn-secondary {
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #d5dbdb;
}

/* Places List Editor */
.places-list-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.place-item-editor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.place-item-editor:hover {
    background: #d5dbdb;
}

.place-item-editor-info {
    flex: 1;
}

.place-item-editor-name {
    font-weight: 600;
    display: block;
}

.place-item-editor-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: block;
    margin-top: 0.25rem;
}

.place-item-editor-actions {
    display: flex;
    gap: 0.5rem;
}

.place-item-editor-actions button {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: none;
    background: white;
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.place-item-editor-actions button:hover {
    background: var(--light);
}

.btn-delete {
    color: var(--danger);
}

.btn-delete:hover {
    background: #fadbd8;
}

/* Places search */
#searchSection {
    background: #f0f7ff;
    border: 1px solid #b3d4f5;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

#searchSection h2 {
    color: #2471a3;
}

#placeSearchContainer {
    width: 100%;
}

#placeSearchContainer > * {
    width: 100%;
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .editor-main {
        flex-direction: column;
    }

    .editor-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 50vh;
    }

    .editor-right {
        flex: 1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .editor-header {
        padding: 0.75rem;
    }

    .editor-header h1 {
        font-size: 1.2rem;
    }

    .editor-left {
        padding: 0.75rem;
    }

    .editor-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .btn-full {
        flex: 1 1 100%;
    }
}
