/* FreeContactForm builder: the workspace. Works with Bootstrap 4's CSS (no Bootstrap JS). */

.fcf-builder {
    --fcf-text: #1f2933;
    --fcf-muted: #5c6873;
    --fcf-border: #dfe3e8;
    --fcf-line: #c9d0d7;
    --fcf-pane: #f7f8fa;
    --fcf-canvas: #eef1f4;
    --fcf-accent: #0062cc;
    --fcf-accent-dark: #0b3d75;
    --fcf-accent-bg: #e3eefb;
    --fcf-accent-line: #9cc1ec;
    --fcf-danger: #a71d2a;
    --fcf-danger-bg: #fbe9eb;
    --fcf-warn: #6b4600;
    --fcf-warn-bg: #fff4d6;
    --fcf-ok: #1e6b35;
    color: var(--fcf-text);
    font-size: 14px;
    border-top: 1px solid var(--fcf-border);
}
.fcf-builder button { font: inherit; }
/* Focus rings for the keyboard only (Bootstrap 4 draws one on every click) */
.fcf-builder button:focus, .fcf-builder summary:focus { outline: none; }
.fcf-builder button:focus-visible, .fcf-builder summary:focus-visible, .fcf-builder a:focus-visible { outline: 2px solid var(--fcf-accent); outline-offset: 2px; }
.fcf-row-main:focus-visible { outline-offset: -2px; }
.fcf-builder svg { flex-shrink: 0; }

/* ---- app bar ---- */
.fcf-appbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--fcf-border); }
.fcf-titleblock { min-width: 0; }
.fcf-titleline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fcf-title { margin: 0; line-height: 1.3; font-family: Montserrat, system-ui, sans-serif; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.fcf-badge { font-size: 12px; font-weight: 500; color: #3d4852; background: var(--fcf-canvas); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.fcf-state { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; border: 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.fcf-state[disabled] { cursor: default; }
.fcf-state.is-ok { background: transparent; color: var(--fcf-ok); padding-left: 0; }
.fcf-state.is-error { background: var(--fcf-danger-bg); color: var(--fcf-danger); }
.fcf-state.is-warning { background: var(--fcf-warn-bg); color: var(--fcf-warn); }
.fcf-saved, .fcf-message { color: var(--fcf-muted); font-size: 13px; }
.fcf-message:empty, .fcf-saved:empty { display: none; }
.fcf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.fcf-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.fcf-divider { width: 1px; height: 24px; background: var(--fcf-border); }

/* Templates menu: a <details> drop-down */
.fcf-menu { position: relative; }
.fcf-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fcf-menu > summary::-webkit-details-marker { display: none; }
.fcf-menu-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 240px; padding: 6px; background: #fff; border: 1px solid var(--fcf-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); }
.fcf-menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--fcf-text); text-align: left; cursor: pointer; }
.fcf-menu-list button:hover, .fcf-menu-list button:focus { background: var(--fcf-canvas); }
.fcf-menu-list { max-height: 70vh; overflow-y: auto; }
.fcf-menu-list button[disabled] { color: #8a96a3; cursor: default; background: none; }
.fcf-menu-wide { left: auto; right: 0; min-width: 340px; }
.fcf-menu-head { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--fcf-muted); }
.fcf-menu-list .fcf-menu-head:not(:first-child) { margin-top: 6px; border-top: 1px solid var(--fcf-border); padding-top: 12px; }
.fcf-menu-empty { margin: 0; padding: 4px 10px 8px; font-size: 13px; color: var(--fcf-muted); }
.fcf-myform { display: flex; align-items: center; gap: 4px; border-radius: 6px; }
.fcf-myform.is-current { background: var(--fcf-accent-bg); }
.fcf-myform > button:first-child { flex: 1 1 auto; min-width: 0; align-items: flex-start; }
.fcf-menu-list .fcf-icon-btn { flex: 0 0 30px; width: 30px; min-height: 30px; padding: 0; border: 0; justify-content: center; }
.fcf-myform-name { display: block; font-weight: 500; }
.fcf-myform-name small { color: var(--fcf-muted); font-weight: 400; }
.fcf-myform-meta { display: block; font-size: 12px; color: var(--fcf-muted); }
.fcf-autosave { font-size: 13px; margin: 0 4px; }
.fcf-autosave .custom-control-label { cursor: pointer; }
.fcf-badge.is-unsaved { background: var(--fcf-warn-bg); color: var(--fcf-warn); }

/* confirmation dialog (native <dialog>: focus stays inside, Escape cancels) */
.fcf-dialog { width: calc(100% - 32px); max-width: 440px; padding: 24px; border: 0; border-radius: 10px; color: var(--fcf-text); box-shadow: 0 20px 48px rgba(16, 24, 40, .25); }
.fcf-dialog::backdrop { background: rgba(16, 24, 40, .45); }
.fcf-dialog-title { margin: 0 0 8px; font-family: Montserrat, system-ui, sans-serif; font-size: 18px; font-weight: 700; }
.fcf-dialog-body { margin: 0 0 16px; color: #3d4852; }
.fcf-dialog-body:empty { display: none; }
.fcf-dialog-actions { display: flex; flex-direction: row-reverse; gap: 8px; margin-top: 8px; }

/* ---- the three panes ---- */
.fcf-left { background: var(--fcf-pane); padding-bottom: 16px; }
.fcf-centre { background: var(--fcf-canvas); display: flex; flex-direction: column; min-width: 0; }
.fcf-right { background: #fff; }
.fcf-pane-head { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 16px 8px; color: var(--fcf-muted); font-size: 12px; }
.fcf-pane-title { margin: 0 0 8px; font-family: Montserrat, system-ui, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #3d4852; }
.fcf-pane-head .fcf-pane-title { margin: 0; }

/* field list */
.fcf-list { list-style: none; margin: 0; padding: 0 8px; }
.fcf-row { display: flex; align-items: center; border-radius: 6px; margin-bottom: 2px; }
.fcf-row:hover { background: #eef1f4; }
.fcf-row.is-selected { background: var(--fcf-accent-bg); box-shadow: inset 0 0 0 1px var(--fcf-accent-line); }
.fcf-row-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; text-align: left; color: inherit; cursor: pointer; border-radius: 6px; }
.fcf-row-text { display: flex; flex-direction: column; min-width: 0; }
.fcf-row-label { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcf-row-meta { font-size: 12px; color: var(--fcf-muted); font-family: SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcf-row.is-selected .fcf-row-label { font-weight: 600; color: var(--fcf-accent-dark); }
.fcf-row.has-error .fcf-row-meta { color: var(--fcf-danger); font-family: inherit; font-weight: 600; }
/* Move and remove buttons: on the row being pointed at, selected or focused (always on touch screens) */
/* drag and drop */
.fcf-row { position: relative; user-select: none; -webkit-user-select: none; }
.fcf-grip { position: absolute; left: -7px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center;
    width: 16px; height: 32px; color: #6b7682; cursor: grab; touch-action: none; opacity: 0; }
.fcf-grip { padding: 0; border: 0; border-radius: 4px; background: none; }
.fcf-grip:hover { color: var(--fcf-text); background: rgba(31, 41, 51, .06); }
.fcf-grip:focus { outline: none; }
.fcf-grip:focus-visible { opacity: 1; color: var(--fcf-accent-dark); box-shadow: 0 0 0 2px var(--fcf-accent); }
.fcf-row:hover .fcf-grip, .fcf-row:focus-within .fcf-grip, .fcf-row.is-selected .fcf-grip { opacity: 1; }
@media (hover: none) { .fcf-grip { opacity: 1; } }
.fcf-row.is-dragging { opacity: .45; }
.fcf-drop-line { position: fixed; z-index: 1060; height: 3px; border-radius: 2px; background: var(--fcf-accent); pointer-events: none;
    box-shadow: 0 0 0 2px #fff; }
.fcf-drop-line::before { content: ""; position: absolute; left: -5px; top: -3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--fcf-accent); background: #fff; }
.fcf-ghost { position: fixed; left: 0; top: 0; z-index: 1061; display: flex; align-items: center; gap: 8px; max-width: 260px; padding: 6px 12px;
    border-radius: 6px; background: #fff; border: 1px solid var(--fcf-accent-line); box-shadow: 0 6px 18px rgba(31, 41, 51, .18);
    font-size: 13px; font-weight: 500; color: var(--fcf-accent-dark); pointer-events: none; white-space: nowrap; }
.fcf-ghost span { overflow: hidden; text-overflow: ellipsis; }
html.fcf-is-dragging, html.fcf-is-dragging * { cursor: grabbing !important; user-select: none !important; }
.fcf-row-tools { display: none; padding-right: 4px; }
.fcf-row:hover .fcf-row-tools, .fcf-row:focus-within .fcf-row-tools, .fcf-row.is-selected .fcf-row-tools { display: flex; }
@media (hover: none) { .fcf-row-tools { display: flex; } }
.fcf-row-tools button, .fcf-opt-tools button, .fcf-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: #3d4852; cursor: pointer; }
.fcf-row-tools button:hover, .fcf-opt-tools button:hover { background: rgba(31, 41, 51, .08); }
.fcf-row-tools button[disabled] { visibility: hidden; }
.fcf-danger { color: #b02a37 !important; }
.fcf-tile { width: 28px; height: 28px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: #fff; border: 1px solid var(--fcf-border); color: #3d4852; }
.fcf-row.is-selected .fcf-tile, .fcf-tile.is-strong { background: var(--fcf-accent); border-color: var(--fcf-accent); color: #fff; }
.fcf-row.has-error .fcf-tile { background: var(--fcf-danger-bg); border-color: #f1b0b7; color: var(--fcf-danger); }
.fcf-empty { padding: 12px 8px; color: var(--fcf-muted); }

/* palette */
.fcf-palette { padding: 20px 16px 4px; }
.fcf-palette-group { font-size: 12px; color: var(--fcf-muted); margin: 0 0 6px; }
.fcf-palette-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.fcf-palette-grid button { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 1px solid var(--fcf-border); border-radius: 6px; background: #fff; color: var(--fcf-text); font-size: 13px; text-align: left; cursor: pointer; }
.fcf-palette-grid button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcf-palette-grid button:hover { border-color: var(--fcf-accent-line); background: #fbfdff; }
.fcf-palette-grid button[disabled] { background: #f1f3f5; color: #6b7682; cursor: not-allowed; }

/* problems */
.fcf-problems { margin: 12px 16px 0; padding: 12px 14px; border-radius: 8px; font-size: 13px; }
.fcf-problems ul { margin: 0; padding-left: 18px; }
.fcf-problems li + li { margin-top: 4px; }
.fcf-problems.is-error { background: var(--fcf-danger-bg); border: 1px solid #f1b0b7; }
.fcf-problems.is-error .fcf-pane-title, .fcf-problems.is-error a { color: var(--fcf-danger); }
.fcf-problems.is-warning { background: var(--fcf-warn-bg); border: 1px solid #f3d27a; }
.fcf-problems.is-warning .fcf-pane-title, .fcf-problems.is-warning a { color: var(--fcf-warn); }
.fcf-problems a { font-weight: 600; text-decoration: underline; }
.fcf-privacy { margin: 16px 16px 0; font-size: 12px; color: var(--fcf-muted); }

/* centre bar: view switch and tools */
.fcf-centre-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--fcf-border); }
.fcf-seg { display: inline-flex; background: var(--fcf-canvas); border-radius: 8px; padding: 3px; }
.fcf-seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border: 0; border-radius: 6px; background: none; color: #3d4852; font-weight: 500; cursor: pointer; }
.fcf-seg button.active { background: #fff; color: var(--fcf-text); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.fcf-centre-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; flex: 1 1 0; min-width: 0; justify-content: flex-end; }
.fcf-centre-body { flex: 1 1 auto; display: flex; flex-direction: column; }

/* inspector */
.fcf-tabs { display: flex; padding: 0 12px; border-bottom: 1px solid var(--fcf-border); position: sticky; top: 0; background: #fff; z-index: 5; }
.fcf-tabs button { height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: #3d4852; cursor: pointer; }
.fcf-tabs button.active { border-bottom-color: var(--fcf-accent); color: var(--fcf-accent); font-weight: 600; }
.fcf-pane { display: none; padding: 0 16px 24px; }
.fcf-pane.active { display: block; }
.fcf-insp-head { display: flex; align-items: center; gap: 10px; margin: 0 -16px; padding: 14px 16px; border-bottom: 1px solid var(--fcf-canvas); }
.fcf-insp-head .fcf-tile { width: 32px; height: 32px; }
.fcf-insp-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fcf-insp-title h3 { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcf-insp-title span { font-size: 12px; color: var(--fcf-muted); }
.fcf-icon-btn { border: 1px solid var(--fcf-border); }
.fcf-sec { padding: 14px 0 6px; border-bottom: 1px solid var(--fcf-canvas); }
.fcf-sec-title { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--fcf-muted); }
.fcf-label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: #1f2933; }
.fcf-insp-body .form-check-label { font-size: 13px; }
.fcf-more { border-bottom: 0; }
.fcf-side { display: flex; width: 100%; margin: 4px 0 6px; }
.fcf-side .btn { flex: 1 1 0; }
.fcf-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
.fcf-pair > .form-check { margin-top: 0; }
.fcf-more > summary { display: flex; flex-direction: column; cursor: pointer; padding-bottom: 8px; list-style: none; }
.fcf-more > summary::-webkit-details-marker { display: none; }
.fcf-more > summary span { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--fcf-muted); }
.fcf-more > summary span::after { content: " ▸"; }
.fcf-more[open] > summary span::after { content: " ▾"; }
.fcf-more > summary small { color: var(--fcf-muted); }
.fcf-empty-state { padding: 48px 16px; text-align: center; color: var(--fcf-muted); }
.fcf-empty-state p { margin: 12px 0 0; }
.fcf-colour-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.fcf-choices th { font-size: 12px; font-weight: 500; color: var(--fcf-muted); padding: 0 .15rem 4px; }
.fcf-choices td { vertical-align: middle; padding: .15rem; }
.fcf-choices td:nth-child(2) { width: 44%; }
.fcf-opt-tools button { width: 26px; height: 26px; }
.fcf-choices td.fcf-opt-grip { width: 16px; padding: 0; }
.fcf-opt-grip .fcf-grip { position: static; transform: none; opacity: 1; width: 16px; height: 30px; }
.fcf-choices tr.is-dragging { opacity: .45; }
.fcf-builder input[type="color"] { padding: .1rem .25rem; height: calc(1.5em + .5rem + 2px); }
/* When a setting has an error, show only the error, not the help text as well */
.fcf-builder .is-invalid ~ .form-text { display: none; }
/* Error messages show whenever they have text (some boxes sit inside a group, away from their message) */
.fcf-builder .invalid-feedback:not(:empty) { display: block; }
.fcf-builder .form-group:has(.is-invalid) > .form-text { display: none; }
/* ready-made colours */
.fcf-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.fcf-preset { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border: 1px solid var(--fcf-border); border-radius: 8px; background: #fff; color: var(--fcf-text); font-size: 13px; cursor: pointer; }
.fcf-preset:hover { border-color: var(--fcf-accent-line); }
.fcf-preset.is-active { border-color: var(--fcf-accent); box-shadow: 0 0 0 1px var(--fcf-accent); font-weight: 600; }
.fcf-swatch { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .08); }
.fcf-swatch-field { display: block; height: 10px; border: 1px solid; border-radius: 2px; }
.fcf-swatch-button { display: block; height: 10px; border-radius: 2px; }

/* views: Preview or Files in the centre (and Build on small screens) */
.fcf-files-slot, .fcf-files-side { display: none; }
.v-files .fcf-files-side { display: block; }
.v-files .fcf-files-slot { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.v-files .fcf-preview-slot, .v-files .fcf-centre-tools, .v-files .fcf-inspector { display: none; }
.fcf-email-slot { display: none; }
.v-email .fcf-email-slot { display: block; }
.v-email .fcf-preview-slot, .v-email .fcf-centre-tools { display: none; }

@media (min-width: 992px) {
    .fcf-work { display: flex; height: calc(100vh - 62px); min-height: 360px; } /* the script fits it between header and footer */
    .fcf-left { flex: 0 0 280px; overflow-y: auto; border-right: 1px solid var(--fcf-border); }
    .fcf-centre { flex: 1 1 auto; }
    .fcf-centre-body { overflow: auto; }
    /* Fields, then their settings, then the preview: settings sit beside the list they belong to */
    .fcf-right { flex: 0 0 360px; overflow-y: auto; order: 1; border-right: 1px solid var(--fcf-border); }
    .fcf-centre { order: 2; }
    .v-files .fcf-right { order: 3; border-right: 0; border-left: 1px solid var(--fcf-border); }
    .fcf-tab-build { display: none !important; }
    /* Files: list and code side by side, each scrolling on its own, so the view always ends at the page bottom */
    .v-files .fcf-centre-body { overflow: hidden; }
    .v-files .fcf-files { flex-wrap: nowrap; }
    .v-files .fcf-file-list { overflow-y: auto; }
}
@media (min-width: 1400px) {
    .fcf-left { flex-basis: 300px; }
    .fcf-right { flex-basis: 380px; }
}
@media (max-width: 991.98px) {
    .fcf-work { display: flex; flex-direction: column; }
    .fcf-centre { order: -1; }
    .v-build .fcf-centre-body, .v-build .fcf-centre-tools { display: none; }
    .fcf-app:not(.v-build) .fcf-left, .v-preview .fcf-right, .v-email .fcf-right { display: none; }
    .fcf-right { border-top: 1px solid var(--fcf-border); }
    .fcf-actions { margin-left: 0; }
    .fcf-divider { display: none; }
    /* On a small screen the preview already has the screen's width */
    .fcf-preview-note, .fcf-centre-tools .btn-group { display: none; }
    .fcf-centre-tools { flex: 0 0 auto; }
    .fcf-title { max-width: 60vw; }
    /* The page scrolls here instead of fitting the window: give the code a real height of its own */
    .fcf-files .fcf-code { flex: none; height: 70vh; min-height: 320px; }
}

/* ---- preview ---- */
.fcf-preview-note { margin-right: auto; min-width: 0; font-size: 13px; color: var(--fcf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcf-preview-note.is-bad { color: var(--fcf-danger); font-weight: 600; }
.fcf-btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fcf-centre-tools .btn-group .btn { display: inline-flex; align-items: center; }
.fcf-centre-tools .btn { white-space: nowrap; }
.fcf-stage { padding: 16px 24px 24px; }
.fcf-stage-note { margin: 0 0 12px; font-size: 12px; color: var(--fcf-muted); }
.fcf-frame { display: block; width: 100%; max-width: 100%; height: 400px; border: 0; background: transparent; }
/* Tablet and phone widths: the frame is outlined, since the page edge matters there */
.fcf-frame[style*="max-width: none"] { margin: 0; outline: 1px dashed #a9b3bd; outline-offset: 4px; }

/* ---- files ---- */
.fcf-files { display: flex; flex-wrap: wrap; flex: 1 1 auto; min-height: 0; background: #fff; }
.fcf-file-list { flex: 1 1 220px; max-width: 260px; padding: 16px 8px; border-right: 1px solid var(--fcf-border); background: var(--fcf-pane); }
.fcf-file-list .fcf-pane-title { padding: 0 8px; }
.fcf-file-list button { display: flex; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 6px; background: none; color: var(--fcf-text); text-align: left; cursor: pointer; }
.fcf-file-list button svg { margin-top: 2px; }
.fcf-file-list button:hover { background: #eef1f4; }
.fcf-file-list button.active { background: var(--fcf-accent-bg); box-shadow: inset 0 0 0 1px var(--fcf-accent-line); color: var(--fcf-accent-dark); }
.fcf-file-name { display: block; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.fcf-file-what { display: block; font-size: 12px; color: var(--fcf-muted); }
.fcf-release-note { margin: 12px 8px 0; padding-top: 12px; border-top: 1px solid var(--fcf-border); font-size: 12px; color: var(--fcf-muted); }
.fcf-file-view { flex: 999 1 400px; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.fcf-file-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--fcf-border); }
.fcf-file-path { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: #3d4852; }
.fcf-file-lines { font-size: 12px; color: var(--fcf-muted); margin-right: auto; }
.fcf-file-about { padding: 8px 16px; background: var(--fcf-pane); border-bottom: 1px solid var(--fcf-border); font-size: 13px; color: #3d4852; }
.fcf-code { flex: 1 1 0; min-height: 120px; overflow: auto; font-size: 12.5px; line-height: 20px; }
.fcf-code-in { display: flex; min-height: 100%; }
.fcf-code pre { margin: 0; padding: 12px 16px; font-size: inherit; line-height: inherit; overflow: visible; }
.fcf-gutter { color: #8a96a3; text-align: right; user-select: none; background: #fbfcfd; border-right: 1px solid var(--fcf-canvas); padding-right: 12px !important; }
.fcf-src { color: var(--fcf-text); white-space: pre; tab-size: 4; }
/* syntax colours in the Files view (all readable on white, 4.5:1 or more) */
.hl-com { color: #5f6b77; font-style: italic; }
.hl-str { color: #0a3069; }
.hl-kw { color: #b3261e; }
.hl-tag { color: #116329; }
.hl-attr { color: #0550ae; }
.hl-num, .hl-const { color: #8a3d00; }
.hl-key, .hl-prop { color: #6639ba; }
.hl-at { color: #b3261e; }
.hl-ent { color: #8a3d00; }
.hl-ph { color: #7a4b00; background: #fff4d6; border-radius: 3px; }

/* download panel */
.fcf-download { padding: 20px 16px; display: flex; flex-direction: column; gap: 20px; }
.fcf-card { border: 1px solid var(--fcf-border); border-radius: 8px; padding: 16px; }
.fcf-card-title { margin: 0 0 12px; font-family: Montserrat, system-ui, sans-serif; font-size: 15px; font-weight: 700; }
.fcf-zip-line { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fcf-zip-line > svg { width: 36px; height: 36px; padding: 8px; border-radius: 6px; background: var(--fcf-canvas); }
.fcf-out-status { margin-top: 10px; font-size: 13px; color: var(--fcf-muted); }
.fcf-out-status.is-bad { color: var(--fcf-danger); font-weight: 600; }
.fcf-out-small, .fcf-note-box .fcf-out-small { margin: 8px 0 0; font-size: 12.5px; color: var(--fcf-muted); }
.fcf-note-box .btn { margin-top: 4px; }
.fcf-file-list .fcf-pane-title-gap { margin-top: 18px; }
.fcf-steps { margin: 0 0 10px; padding-left: 20px; font-size: 13px; line-height: 20px; }
.fcf-steps li + li { margin-top: 8px; }
.fcf-download code { color: #3d4852; font-size: 12px; }
.fcf-note-box { background: var(--fcf-pane); border-radius: 8px; padding: 14px 16px; }
.fcf-note-box .fcf-card-title { font-size: 13px; margin-bottom: 6px; }
.fcf-note-box p { margin: 0; font-size: 13px; line-height: 20px; color: #3d4852; }

/* undo and redo */
.fcf-history .btn { display: inline-flex; align-items: center; padding: 4px 8px; }
.fcf-toast { position: fixed; left: 16px; bottom: 16px; z-index: 1070; display: flex; align-items: center; gap: 4px; max-width: min(480px, calc(100vw - 32px));
    padding: 8px 8px 8px 14px; border-radius: 8px; background: #1f2933; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(16, 24, 40, .25); }
.fcf-toast[hidden] { display: none; }
.fcf-toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcf-toast .btn-link { color: #9cc3ff; font-weight: 600; }

/* the email view */
.fcf-email { padding: 16px 24px 24px; max-width: 860px; }
.fcf-email-note { margin: 0 0 12px; font-size: 12px; color: var(--fcf-muted); }
.fcf-email-card { background: #fff; border: 1px solid var(--fcf-border); border-radius: 8px; overflow: hidden; }
.fcf-email-head { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--fcf-border); font-size: 14px; }
.fcf-email-head dt { color: var(--fcf-muted); font-weight: 400; }
.fcf-email-head dd { margin: 0; color: var(--fcf-text); word-break: break-word; }
.fcf-email-subject { font-weight: 600; }
.fcf-email-bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--fcf-pane); border-bottom: 1px solid var(--fcf-border); }
.fcf-email-frame { display: block; width: 100%; height: 480px; border: 0; background: #fff; } /* then as tall as the email */
.fcf-email-text { margin: 0; padding: 16px; white-space: pre-wrap; font: 13px/1.6 SFMono-Regular, Menlo, Consolas, monospace; color: var(--fcf-text); }
.fcf-email-problem { padding: 24px 16px; color: var(--fcf-danger); font-weight: 600; }
