.social-post-section {
    background: #f4f7fb;
    border-block: 1px solid #dfe6ef;
}

.social-post-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.social-post-heading > p {
    max-width: 520px;
    margin: 0;
    color: #526178;
    font-size: 1rem;
    line-height: 1.65;
}

.social-post-studio {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(13, 35, 73, 0.1);
}

.social-post-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 28px;
    border-right: 1px solid #dfe6ef;
}

.social-post-role {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.social-post-role legend,
.social-post-adjustments > label {
    margin-bottom: 10px;
    color: #0d264b;
    font-size: 0.9rem;
    font-weight: 800;
}

.social-post-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 4px;
    border: 1px solid #cfd9e7;
    border-radius: 7px;
    background: #eef3f8;
}

.social-post-segmented button {
    min-height: 44px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #435269;
    font-weight: 800;
}

.social-post-segmented button.is-active {
    background: #fff;
    color: #4f17b8;
    box-shadow: 0 2px 9px rgba(13, 35, 73, 0.12);
}

.social-post-segmented i,
.social-post-actions i,
.social-post-recenter i {
    margin-right: 6px;
}

.social-post-upload label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 16px;
    border: 1px dashed #4f17b8;
    border-radius: 6px;
    background: #f7f3ff;
    color: #4f17b8;
    font-weight: 800;
    cursor: pointer;
}

.social-post-upload label:hover {
    background: #efe7ff;
}

.social-post-upload label i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.social-post-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.social-post-upload:focus-within label {
    outline: 3px solid rgba(79, 23, 184, 0.25);
    outline-offset: 2px;
}

.social-post-upload p,
.social-post-preview > p,
.social-post-privacy {
    margin: 9px 0 0;
    color: #65748b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.social-post-adjustments[hidden] {
    display: none;
}

.social-post-range-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    color: #64748b;
}

.social-post-range-row input {
    width: 100%;
    accent-color: #4f17b8;
}

.social-post-recenter {
    min-height: 42px;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #cfd9e7;
    border-radius: 6px;
    background: #fff;
    color: #213a61;
    font-weight: 700;
}

.social-post-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.social-post-actions button {
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 6px;
    font-weight: 800;
}

.social-post-download {
    border: 1px solid #4f17b8;
    background: #4f17b8;
    color: #fff;
}

.social-post-share {
    border: 1px solid #00a6a6;
    background: #fff;
    color: #007c7c;
}

.social-post-actions button:disabled {
    border-color: #d9e0e9;
    background: #edf1f5;
    color: #8d99aa;
    cursor: not-allowed;
}

.social-post-privacy {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: #3f526c;
}

.social-post-privacy i {
    flex: 0 0 auto;
    color: #07865f;
    font-size: 1rem;
}

.social-post-preview {
    min-width: 0;
    padding: 28px;
    background: #eef2f7;
}

.social-post-canvas-wrap {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #c9d3e0;
    background: #19243c;
    box-shadow: 0 14px 30px rgba(13, 35, 73, 0.14);
}

.social-post-canvas-wrap.is-draggable {
    cursor: grab;
    touch-action: none;
}

.social-post-canvas-wrap.is-dragging {
    cursor: grabbing;
}

.social-post-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.social-post-status {
    min-height: 24px;
    margin-top: 12px;
    color: #263d60;
    font-size: 0.9rem;
    font-weight: 700;
}

.social-post-status.is-error {
    color: #b42318;
}

@media (max-width: 991.98px) {
    .social-post-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .social-post-studio {
        grid-template-columns: 1fr;
    }

    .social-post-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-right: 0;
        border-bottom: 1px solid #dfe6ef;
    }

    .social-post-actions,
    .social-post-privacy {
        grid-column: 1 / -1;
    }

    .social-post-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .social-post-heading {
        margin-bottom: 20px;
    }

    .social-post-controls,
    .social-post-preview {
        padding: 20px;
    }

    .social-post-controls {
        display: flex;
    }

    .social-post-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .social-post-preview > p {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-post-segmented button,
    .social-post-upload label,
    .social-post-actions button {
        transition: none;
    }
}
