/* ============================================================
   GUARUGEO - EDITOR & CUSTOM MODALS
   ============================================================ */

/* Editor Panel (Sidebar) */
.editor-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.editor-panel.hidden {
    transform: translateX(-100%);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

#closeEditor {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

#formContainer {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.form-actions {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

/* Base Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: flex;
    gap: 12px;
}

/* Custom Modals (Unified) */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.custom-modal-overlay.active {
    display: flex;
}

.custom-modal {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

.custom-modal-header {
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-title {
    font-weight: 800;
    font-size: 16px;
    color: var(--text-main);
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.custom-modal-body {
    padding: 24px;
}

.modal-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Shared Buttons */
.btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.secondary {
    background: #e2e8f0;
    color: var(--text-main);
}

.btn-ghost {
    background: none;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-rich {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    cursor: pointer;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}