.editor-window {
    border: 1px solid black;
    padding: 1px;
}

.editor-base {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: row;
    background-color: white;
}

.editor-left {
    width: 500px;
    flex-shrink: 0;
}

.editor-middle {
    flex: 1;
    min-width: 0;
}

.editor-right {
    width: 300px;
    flex-shrink: 0;
}

.editor-components {
    width: 100%;
    height: 20%;
    overflow: auto;
}

.editor-hierarchy {
    width: 100%;
    height: 80%;
    box-sizing: content-box;
}

.editor-page-content {
    height: 100%;
    overflow: auto;
    margin: 0;
    position: relative;
}

/* attrs */

.attrs-base {
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    font-family: roboto, sans-serif;
    font-size: 13px;
}

.attrs-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid #e1e1e1;
    background: #f8f9fa;
}

.attrs-toolbar button {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.attrs-toolbar button.active {
    background: #0066cc;
    color: white;
    border-color: #0055bb;
}

.attrs-table {
    display: flex;
    flex-direction: column;
}

.attrs-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
}

.attrs-label {
    font-weight: 500;
    color: #555;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attrs-value {
    display: flex;
    align-items: center;
}

/* Control Input Styles */
.attrs-value input[type="text"],
.attrs-value input[type="number"],
.attrs-value select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

.attrs-value input[type="checkbox"] {
    cursor: pointer;
}

.color-picker-wrapper {
    display: flex;
    gap: 6px;
    width: 100%;
}

.color-picker-wrapper input[type="color"] {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}

/* PALETTE */

.palette-container {
    padding: 12px;
    font-family: roboto, sans-serif;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    overflow: auto;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: grab;
    user-select: none;
    font-size: 13px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.palette-item:active {
    cursor: grabbing;
}

.palette-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.palette-icon {
    font-weight: bold;
    color: #3b82f6;
}

/* HIERARCHY */

.hierarchy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 6px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.hierarchy-actions {
    display: flex;
    gap: 4px;
}

.action-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.action-btn.delete-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fca5a5;
}

.hierarchy-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    user-select: none;
    font-size: 13px;
    font-family: roboto, sans-serif;
}

.hierarchy-header {
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

.hierarchy-tree {
    padding: 6px 0;
    overflow-y: auto;
}

.tree-node {
    display: flex;
    flex-direction: column;
}

.node-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    margin: 1px 4px;
    gap: 4px;
}

.node-item:hover {
    background-color: #f1f5f9;
}

.node-item.selected {
    background-color: #e0f2fe;
    color: #0284c7;
    font-weight: 500;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 9px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    padding: 0;
}

.toggle-spacer {
    width: 16px;
}

.node-children {
    padding-left: 14px;
    border-left: 1px dashed #cbd5e1;
    margin-left: 12px;
}

.hierarchy-empty {
    padding: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* UPLAODERS */

.uploader-card {
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    box-sizing: border-box;
    font-family: roboto, sans-serif;
}

.uploader-card h3 {
    margin: 0 0 1rem;
    color: #111827;
    font-size: 1rem;
}

.uploader-toggle {
    display: flex;
    margin-bottom: 1rem;
    background: #f3f4f6;
    border-radius: .5rem;
    padding: .25rem;
}

.uploader-toggle button {
    flex: 1;
    padding: .5rem;
    border: none;
    background: transparent;
    border-radius: .35rem;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    transition: .15s;
}

.uploader-toggle button.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.uploader-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.uploader-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.uploader-field label {
    font-size: .8rem;
    color: #4b5563;
}

.uploader-file-input,
.uploader-text-input {
    width: 100%;
    box-sizing: border-box;
}

.uploader-text-input {
    padding: .55rem .75rem;
    border: 1px solid #d1d5db;
    border-radius: .4rem;
    background: white;
}

.uploader-text-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.uploader-file-input::file-selector-button {
    padding: .45rem .8rem;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: .4rem;
    cursor: pointer;
    margin-right: .75rem;
}

.uploader-file-input::file-selector-button:hover {
    background: #f3f4f6;
}

.uploader-btn {
    width: 100%;
    padding: .7rem;
    border: none;
    border-radius: .45rem;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.uploader-btn:hover:not(:disabled) {
    background: #1d4ed8;
}

.uploader-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.uploader-status {
    margin: 0;
    font-size: 1rem;
    color: #6b7280;
}

/* FILE TREE */
.file-tree {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    font-family: system-ui, sans-serif;
}

.file-tree-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    min-height: 38px;
}

.file-tree-row:hover {
    background: #f6f8fa;
}

.file-tree-chevron {
    width: 18px;
    cursor: pointer;
    user-select: none;
    text-align: center;
}

.file-tree-spacer {
    width: 18px;
}

.file-tree-icon {
    width: 20px;
    text-align: center;
}

.file-tree-name {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.file-tree-actions {
    display: flex;
    gap: .35rem;
    opacity: 0;
    transition: opacity .15s;
}

.file-tree-row:hover .file-tree-actions {
    opacity: 1;
}

.file-tree-actions button {
    border: none;
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    padding: .25rem;
}

.file-tree-actions button:hover {
    background: #e5e7eb;
}

.asset-root {
    width: 100vw;
    height: 100vh;
    overflow: auto;
}

.editor-selected-mask {
    position: absolute;
    left: 200px;
    top: 100px;
    width: 100px;
    height: 100px;

    border: 5px solid var(--main-color);
    z-index: 9999;
    pointer-events: none;
}

/* CSS EDITOR */

.css-editor-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.css-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.css-editor-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.css-editor-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.css-editor-btn {
    padding: 0.625rem 1.25rem;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.css-editor-btn:hover {
    background-color: #1d4ed8;
}

.css-editor-btn:active {
    transform: scale(0.98);
}

.css-editor-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.css-editor-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: #ffffff;
}