/* ── Page & grid layout ──────────────────────────────────────────────────── */
.ep-page {
    font-family: var(--mainFont);
    min-height: 100vh;
}

.ep-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 24px;
}

/* ── Main content column — white panel on grey page ──────────────────────── */
.ep-main {
    flex: 1;
    min-width: 0;
    max-width: 700px;
    padding: 28px 16px 48px;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.ep-header {
    padding: 16px 24px 14px;
    background: rgb(18, 18, 18);
}

.ep-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    font-family: var(--mainFont);
    color: white;
    text-align: center;
    text-transform: uppercase;
    background: transparent;
}

/* ── Sections — separated by horizontal rules ────────────────────────────── */
.ep-section {
    padding: 24px 0;
    border-top: 1.5px solid #ebebeb;
}

.ep-main > .ep-section:first-child {
    border-top: none;
    padding-top: 0;
}

.ep-section-header {
    margin-bottom: 18px;
}

.ep-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ep-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 5px;
}

.ep-section-revert {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: var(--mainFont);
    font-size: 0.78rem;
    font-weight: 400;
    color: #999;
    visibility: hidden;
}
.ep-section-revert.active { visibility: visible; }

.ep-section-revert-icon {
    font-size: 18px;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ep-section-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.ep-section-body { /* no extra padding — inherits from ep-main */ }

/* ── Sidebar column — mirrors #settingsColumn / #settingsButtonsColumn ────── */
.ep-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 28px 16px 14px 4px;
    box-sizing: border-box;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    font-family: var(--mainFont);
}

.ep-sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 4px;
}

.ep-sidebar-buttons .settingsButton {
    margin: 8px 0px;
}

.ep-save-error {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #c00;
    min-height: 16px;
    font-family: var(--mainFont);
    padding-left: 4px;
}

/* ── Responsive: sidebar moves below main on mobile ─────────────────────── */
@media (max-width: 800px) {
    .ep-grid {
        flex-direction: column;
        gap: 0;
    }
    .ep-main {
        padding: 16px 16px 8px;
    }
    .ep-sidebar {
        width: 100%;
        position: static;
        padding: 0 16px 36px;
    }
}

/* ── Username ────────────────────────────────────────────────────────────── */
.ep-username-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f7f7;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color 0.15s;
}

.ep-username-field:focus-within {
    border-color: rgb(18, 18, 18);
}

.ep-username-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: var(--mainFont);
    outline: none;
    color: rgb(18, 18, 18);
    min-width: 0;
}

.ep-username-counter {
    font-size: 0.75rem;
    color: #bbb;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    transition: color 0.15s;
}
.ep-username-counter--warn { color: #e07000; }

.ep-username-error {
    margin-top: 7px;
    font-size: 0.8rem;
    color: #c00;
    min-height: 16px;
}

/* ── Profile image editor ────────────────────────────────────────────────── */
.ep-profile-editor-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.ep-circle-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: grab;
    flex-shrink: 0;
    background: #e8e8e8;
    box-shadow: 0 0 0 4px white, 0 0 0 5.5px #e0e0e0;
    touch-action: none;
}

@media (max-width: 480px) {
    .ep-circle-wrap {
        width: 200px;
        height: 200px;
    }
}

.ep-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

body.ep-dragging,
body.ep-dragging * { cursor: grabbing !important; }

.ep-controls-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* ── Background image editor ─────────────────────────────────────────────── */
.ep-bg-wrap {
    position: relative;
    width: 100%;
    height: 115px;
    border-radius: 12px;
    overflow: hidden;
    cursor: grab;
    background: #e8e8e8;
    touch-action: none;
}

@media (max-width: 800px) {
    .ep-bg-wrap { height: 100px; }
}

.ep-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.ep-bg-controls-row {
    margin-top: 10px;
}

/* ── Corner pan indicators ───────────────────────────────────────────────── */
.ep-corner-arrows {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ep-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: rgba(255, 255, 255, 0.85);
    border-style: solid;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}
.ep-corner--tl { top: 10px;    left: 10px;   border-width: 2px 0 0 2px; }
.ep-corner--tr { top: 10px;    right: 10px;  border-width: 2px 2px 0 0; }
.ep-corner--bl { bottom: 10px; left: 10px;   border-width: 0 0 2px 2px; }
.ep-corner--br { bottom: 10px; right: 10px;  border-width: 0 2px 2px 0; }

/* ── Shared image editor button styles ───────────────────────────────────── */
.ep-edit-btn {
    background: white;
    color: black;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--mainFont);
    white-space: nowrap;
    transition: background 0.15s;
}
.ep-edit-btn:hover { background: #f0f0f0; }


.ep-zoom-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1.5px solid #e0e0e0;
}

.ep-zoom-btn {
    background: white;
    color: black;
    border: none;
    width: 36px;
    height: 32px;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    font-family: var(--mainFont);
    transition: background 0.15s;
}
.ep-zoom-btn:hover { background: #f0f0f0; }

.ep-zoom-sep {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

