.et-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.et-empty {
    opacity: 0.7;
    font-size: 0.85rem;
}

.et-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.et-toolbar-end {
    justify-content: flex-end;
}

.et-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
}

    .et-btn:hover {
        background: #46586A;
    }

    .et-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

.et-btn-primary {
    background: #46586A;
}

    .et-btn-primary:hover {
        background: #5a6f85;
    }

.et-btn-danger {
    background: #b3352e;
    color: #ECE5D6;
}

    .et-btn-danger:hover {
        background: #8a2823;
    }

.et-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
}

    .et-icon-btn:hover {
        background: #46586A;
    }

    .et-icon-btn:disabled {
        opacity: 0.4;
        cursor: default;
    }

    .et-icon-btn.active {
        background: #46586A;
    }

.et-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
}

.et-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.et-toolbar-spacer {
    flex: 1;
}

.et-name-input {
    box-sizing: border-box;
    width: 220px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ECE5D6;
    padding: 6px 8px;
    font-size: 0.85rem;
    font-family: inherit;
}

    .et-name-input:focus {
        outline: none;
        border-color: #8D9A8C;
    }

.et-device-toggle {
    display: flex;
    gap: 4px;
}

.et-editor-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.et-editor-left {
    width: 220px;
    flex: none;
    overflow-y: auto;
    margin-right: 16px;
}

.et-splitter {
    flex: none;
    width: 6px;
    margin-right: 16px;
    cursor: col-resize;
    position: relative;
    z-index: 1;
}

    .et-splitter::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 2px;
        width: 2px;
        border-radius: 1px;
        background: transparent;
    }

    .et-splitter:hover::after,
    body.et-resizing .et-splitter::after {
        background: rgba(255, 255, 255, 0.25);
    }

body.et-resizing {
    cursor: col-resize;
    user-select: none;
}

.et-editor-canvas-wrap {
    flex: 1;
    min-width: 0;
    overflow: auto;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.et-editor-canvas {
    box-sizing: border-box;
    background: #ECE5D6;
    color: #232F3B;
    min-height: 100%;
    width: 100%;
    padding: 20px;
    transition: width 0.15s ease;
}

.et-editor-canvas.et-device-tablet {
    width: 768px;
}

.et-editor-canvas.et-device-mobile {
    width: 375px;
}

.et-row {
    display: flex;
    flex-direction: column;
}

.et-comp-wrapper {
    cursor: grab;
    outline: 1px dashed transparent;
}

    .et-comp-wrapper:hover {
        outline-color: rgba(70, 88, 106, 0.5);
    }

    .et-comp-wrapper.selected {
        outline: 2px solid #46586A;
    }

.et-columns {
    display: flex;
    width: 100%;
}

.et-column {
    box-sizing: border-box;
    min-height: 40px;
}

/* Columns stack vertically on mobile (Module.md: "In responsive, columns should be under each
   other in smaller devices") — desktop and tablet stay side by side, matching how most email
   clients only break to a single column below phone-width viewports. */
.et-editor-canvas.et-device-mobile .et-columns {
    flex-direction: column;
}

.et-editor-canvas.et-device-mobile .et-column {
    width: 100% !important;
}

.et-comp-button {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #232F3B;
    cursor: pointer;
}

.et-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.4);
}

.et-palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.et-palette-item {
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: inherit;
    font-size: 0.8rem;
    cursor: grab;
}

.et-palette-hint {
    grid-column: 1 / -1;
}

.et-properties {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px 0 0;
}

.et-properties-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.et-properties-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-self: flex-start;
}

.et-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

    .et-table th {
        text-align: left;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.7;
        padding: 6px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .et-table td {
        padding: 6px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        vertical-align: middle;
    }

    .et-table tbody tr {
        cursor: pointer;
    }

        .et-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.06);
        }

.et-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.et-dialog {
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 20px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

    .et-dialog p {
        margin: 0 0 16px;
        font-size: 0.9rem;
    }

.et-dialog-title {
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.et-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.et-error {
    color: #e58a8a;
    font-size: 0.85rem;
    margin: 0 0 12px;
}

.et-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

    .et-field label {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.7;
    }

    .et-field input,
    .et-field select,
    .et-field textarea {
        box-sizing: border-box;
        width: 100%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        color: #ECE5D6;
        padding: 6px 8px;
        font-size: 0.85rem;
        font-family: inherit;
    }

    .et-field textarea {
        min-height: 60px;
        resize: vertical;
    }

    .et-field input[type="color"] {
        padding: 2px;
        height: 30px;
    }

        .et-field input:focus,
        .et-field select:focus,
        .et-field textarea:focus {
            outline: none;
            border-color: #8D9A8C;
        }

.et-field-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

    .et-field-row input {
        min-width: 0;
    }

.et-field-row-4 input {
    width: 25%;
}

.et-props-section {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .et-props-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.et-props-section-title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8D9A8C;
}

.et-props-image-preview {
    display: block;
    max-width: 100%;
    max-height: 120px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.et-row.drop-target,
.et-column.drop-target {
    outline: 2px dashed #8D9A8C;
    outline-offset: 2px;
}

.et-column-count-options {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.et-preview-dialog {
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    width: 90vw;
    max-width: 1100px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.et-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
    font-weight: 600;
}

.et-preview-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.et-preview-frame-wrap {
    flex: 1;
    min-width: 0;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
}

.et-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
    border-radius: 4px;
}

.et-preview-sidebar {
    width: 300px;
    flex: none;
    padding: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.et-preview-params {
    box-sizing: border-box;
    width: 100%;
    min-height: 140px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ECE5D6;
    padding: 8px;
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    resize: vertical;
    margin-bottom: 8px;
}

.et-preview-send-title {
    margin-top: 20px;
}

.et-richtext-dialog {
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    width: 75vw;
    height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 16px 16px;
}

    .et-richtext-dialog .et-preview-header {
        margin: 0 -16px;
    }

    .et-richtext-dialog .et-dialog-actions {
        flex: none;
    }

.et-richtext-editor-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

    .et-richtext-editor-wrap .tox-tinymce {
        flex: 1;
        border-radius: 4px;
    }
