
/* ========================================================================== */
/* /assets/css/string-art-editor.css                                          */
/* ========================================================================== */

.sa-editor-page {
    min-height: calc(100dvh - 72px);
    padding: 18px 0 32px;
    background:
        radial-gradient(circle at top right, rgba(84, 121, 140, .12), transparent 35%),
        linear-gradient(180deg, #f9fbfc 0%, #eef3f5 100%);
}

.sa-editor-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.sa-editor-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
}

.sa-editor-kicker {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sa-editor-title h1 {
    margin: 3px 0 0;
    color: var(--text-dark);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.sa-editor-title p {
    max-width: 430px;
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    text-align: right;
}

.sa-editor-window {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 35px rgba(55, 74, 87, .08);
}

.sa-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 28px;
    border-bottom: 1px solid var(--border);
    background: #f9fbfc;
}

.sa-editor-shape-control {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text-dark);
    font-size: 14px;
}

.sa-editor-shape-control select {
    min-height: 38px;
    padding: 7px 34px 7px 11px;
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.sa-editor-shape-control select:focus,
#points:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(84, 121, 140, .13);
}

.sa-editor-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.editor-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    color: var(--text-mid);
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.editor-action:hover,
.editor-action:focus-visible {
    color: var(--accent-dark);
    border-color: var(--border);
    background: #fff;
    outline: none;
}

.editor-action__icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.sa-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: 30px;
    padding: 30px 38px;
}

.sa-editor-panel {
    min-width: 0;
}

.editor-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.sa-editor-window .step-number {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
}

.editor-panel-heading h2 {
    margin: 0 0 4px;
    color: var(--text-dark);
    font-size: 23px;
    line-height: 1.2;
}

.editor-panel-heading p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.45;
}

.editor-canvas-wrap {
    width: min(100%, 500px);
    aspect-ratio: 1;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid var(--text-dark);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(84, 121, 140, .08);
}

.editor-canvas-wrap.circle {
    border-radius: 50%;
}

.editor-canvas-wrap.square {
    border-radius: 12px;
}

#myCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.editor-save-image {
    width: 100%;
    margin-top: 14px;
    font: inherit;
}

.editor-textarea-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
}

#points {
    width: 100%;
    min-height: 340px;
    resize: vertical;
    padding: 14px;
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfcfd;
    font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.editor-hint {
    margin-top: 12px;
    padding: 12px 13px;
    color: var(--text-mid);
    border: 1px solid #cbdde5;
    border-radius: 9px;
    background: var(--accent-light);
    font-size: 12px;
    line-height: 1.55;
}

.editor-hint code {
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .7);
    color: var(--accent-dark);
}

.editor-draw-button {
    width: 100%;
    min-height: 46px;
    margin-top: 16px;
    font: inherit;
}

.editor-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 17px 38px;
    border-top: 1px solid var(--border);
    background: #f9fbfc;
}

.editor-info p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
}

.editor-info a {
    color: var(--accent-dark);
    text-underline-offset: 2px;
}

@media (max-width: 820px) {
    .sa-editor-page { min-height: auto; }
    .sa-editor-container { width: min(100% - 28px, 620px); }
    .sa-editor-title { display: block; }
    .sa-editor-title p { margin-top: 8px; text-align: left; }
    .sa-editor-toolbar { padding: 14px 16px; }
    .sa-editor-grid { grid-template-columns: 1fr; padding: 22px 16px; }
    #points { min-height: 230px; }
    .editor-info { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
}

@media (max-width: 520px) {
    .sa-editor-toolbar { align-items: flex-start; flex-direction: column; }
    .sa-editor-actions { width: 100%; justify-content: space-between; }
    .editor-action { flex: 1; justify-content: center; padding: 7px 4px; }
    .editor-action span:last-child { font-size: 12px; }
    .editor-panel-heading h2 { font-size: 21px; }
    .sa-editor-window .step-number { width: 36px; height: 36px; border-radius: 10px; }
}
