/**
 * Superio Customization — Rich Paste Editor
 * Styles the contenteditable div that replaces the job description textarea.
 */

/* ── Editor container ──────────────────────────────────────────────────────── */

.sc-rich-editor {
    display: block;
    width: 100%;
    min-height: 180px;
    max-height: 540px;
    overflow-y: auto;
    padding: 10px 14px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.65;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    outline: none;
    resize: vertical;         /* draggable resize handle like a textarea */
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    word-break: break-word;
    overflow-wrap: break-word;
}

.sc-rich-editor:focus {
    border-color: #1967D2;
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.1);
}

/* ── Placeholder ─────────────────────────────────────────────────────────── */

.sc-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none;
    display: block;
    font-style: italic;
}

/* ── Rich content typography inside the editor ───────────────────────────── */

.sc-rich-editor > *:first-child { margin-top: 0 !important; }
.sc-rich-editor > *:last-child  { margin-bottom: 0 !important; }

.sc-rich-editor p {
    margin: 0 0 0.75em;
    line-height: 1.65;
}

.sc-rich-editor h1,
.sc-rich-editor h2,
.sc-rich-editor h3,
.sc-rich-editor h4,
.sc-rich-editor h5,
.sc-rich-editor h6 {
    font-weight: 700;
    line-height: 1.3;
    margin: 1em 0 0.4em;
    color: #1a1a1a;
}

.sc-rich-editor h1 { font-size: 1.55em; }
.sc-rich-editor h2 { font-size: 1.35em; }
.sc-rich-editor h3 { font-size: 1.15em; }
.sc-rich-editor h4 { font-size: 1.05em; }
.sc-rich-editor h5,
.sc-rich-editor h6 { font-size: 1em; }

.sc-rich-editor ul,
.sc-rich-editor ol {
    padding-left: 1.5em;
    margin: 0.4em 0 0.75em;
}

.sc-rich-editor li {
    margin: 0.2em 0;
    line-height: 1.6;
}

.sc-rich-editor li + li {
    margin-top: 0.15em;
}

.sc-rich-editor strong,
.sc-rich-editor b {
    font-weight: 700;
}

.sc-rich-editor em,
.sc-rich-editor i {
    font-style: italic;
}

.sc-rich-editor u {
    text-decoration: underline;
}

.sc-rich-editor s,
.sc-rich-editor del {
    text-decoration: line-through;
    color: #888;
}

.sc-rich-editor a {
    color: #1967D2;
    text-decoration: underline;
}

.sc-rich-editor code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
    background: #f1f3f5;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #c7254e;
}

.sc-rich-editor pre {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 12px 14px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
    line-height: 1.5;
    margin: 0.75em 0;
    color: #333;
    white-space: pre;
}

.sc-rich-editor pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

.sc-rich-editor blockquote {
    border-left: 4px solid #1967D2;
    margin: 0.75em 0;
    padding: 0.35em 1em;
    color: #555;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

.sc-rich-editor hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1em 0;
}
