/*
 * SMARTForm Sanger — same look as SMARTForm Long Read (Smart Form plugin, Vuetify 3):
 *   primary   #122F54 (navy)      secondary #63B4C9 (SMARTLife cyan)
 *   box border #0097B2            filled fields #E3F2FD, bottom line rgba(0,0,0,.38)
 *   warning   #FB8C00 (Reset)     success #4CAF50 (Download Sample Sheet)
 *   Roboto, text rgba(0,0,0,.87), h2 24px/700 centered, buttons 36px uppercase.
 */
:root {
    --sfs-primary: #122f54;
    --sfs-secondary: #63b4c9;
    --sfs-border: #0097b2;
    --sfs-field: #e3f2fd;
    --sfs-warning: #fb8c00;
    --sfs-success: #4caf50;
    --sfs-error: #b00020;
    --sfs-text: rgba(0, 0, 0, .87);
    --sfs-muted: rgba(0, 0, 0, .6);
    --sfs-line: rgba(0, 0, 0, .38);
    --sfs-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
    --sfs-sanger: #f28c28;
}

/* Let the form use the page width inside Divi containers. */
body.sfs-page .et_pb_row,
body.sfs-page .et_builder_inner_content,
body.sfs-page #main-content .container,
body.sfs-page .entry-content,
body.sfs-page article { max-width: none !important; width: 100% !important; }
body.sfs-page #main-content .container:before { display: none; }
body.sfs-page .entry-title,
body.sfs-page .et_post_meta_wrapper { display: none; }

/* v-container widths */
.sfs-wrap {
    width: 100%;
    max-width: 100%;
    margin: 16px auto 64px;
    padding: 16px;
    box-sizing: border-box;
    color: var(--sfs-text);
    font-family: Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: normal;
}
@media (min-width: 960px)  { .sfs-wrap { max-width: 900px; } }
@media (min-width: 1280px) { .sfs-wrap { max-width: 1200px; } }
@media (min-width: 1920px) { .sfs-wrap { max-width: 1800px; } }
@media (min-width: 2560px) { .sfs-wrap { max-width: 2400px; } }
.sfs-wrap *, .sfs-wrap *::before, .sfs-wrap *::after { box-sizing: border-box; }
.sfs-wrap input, .sfs-wrap select, .sfs-wrap textarea, .sfs-wrap button { font-family: Roboto, sans-serif; }

.sfs-title { margin: 0 0 4px; text-align: center; color: var(--sfs-primary); font-family: Roboto, sans-serif; font-size: 32px; font-weight: 700; line-height: 1.3; }
.sfs-subtitle { margin: 0 0 28px; text-align: center; font-size: 14px; color: var(--sfs-muted); }
.sfs-subtitle a { color: var(--sfs-border); }

/* Grid: v-row / v-col md=6 */
.sfs-row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.sfs-row > .sfs-col { flex: 0 0 50%; max-width: 50%; padding: 12px; }
.sfs-col { min-width: 0; }

/* Filled text field with floating label (v-text-field variant="filled") */
.sfs-field {
    position: relative;
    display: block;
    background: var(--sfs-field);
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 -1px 0 var(--sfs-line);
    transition: box-shadow .2s;
}
.sfs-field:focus-within { box-shadow: inset 0 -2px 0 var(--sfs-primary); }
.sfs-field input,
.sfs-field select,
.sfs-field textarea {
    display: block;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 24px 16px 6px;
    border: 0 !important;
    border-radius: 0;
    outline: none;
    background: transparent !important;
    color: var(--sfs-text);
    font-size: 16px;
    line-height: 1.5;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.sfs-field select { padding-right: 40px; cursor: pointer; }
.sfs-field--select::after {
    content: "";
    position: absolute; right: 16px; top: 50%;
    margin-top: -2px;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 5px solid var(--sfs-muted);
    pointer-events: none;
}
.sfs-field label {
    position: absolute;
    left: 16px; top: 8px;
    max-width: calc(100% - 32px);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    color: var(--sfs-muted);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: .009em;
    pointer-events: none;
    transition: top .15s, font-size .15s, color .15s;
}
.sfs-field:focus-within label { color: var(--sfs-primary); }
/* Empty field: label sits inside, like Vuetify */
.sfs-field input:placeholder-shown:not(:focus) + label,
.sfs-field textarea:placeholder-shown:not(:focus) + label { top: 18px; font-size: 16px; line-height: 20px; }
.sfs-field textarea::placeholder { color: transparent; }
.sfs-field textarea:focus::placeholder { color: rgba(0,0,0,.38); }
.sfs-field select:invalid, .sfs-field select option[value=""] { color: var(--sfs-muted); }
.sfs-field.is-readonly { opacity: .55; }
.sfs-field.is-readonly input { color: rgba(0,0,0,.6); cursor: default; }
.sfs-field--textarea { margin-top: 12px; }
.sfs-field--textarea textarea { min-height: 56px; resize: vertical; }
.sfs-hint { padding: 6px 16px 0; font-size: 12px; line-height: 12px; letter-spacing: .4px; color: var(--sfs-muted); }

/* Boxes = .smart-blue-border (v-row class="mt-12 py-6 smart-blue-border") */
.sfs-box { margin: 48px 0 0; padding: 24px 12px; border: 1px solid var(--sfs-border); }
.sfs-box h2 { margin: 16px 0 0; text-align: center; color: var(--sfs-text); font-family: Roboto, sans-serif; font-size: 24px; font-weight: 700; line-height: 36px; letter-spacing: normal; }
.sfs-box-intro { margin: 0 0 24px; padding: 0; text-align: center; font-size: 16px; line-height: 24px; color: var(--sfs-text); }
.sfs-or { margin: 4px 0; text-align: center; font-size: 24px; line-height: 2rem; color: var(--sfs-text); }

/* Upload */
.sfs-upload-actions { display: flex; justify-content: center; margin: 0 0 20px; }
.sfs-file { display: flex; align-items: flex-start; gap: 16px; padding: 0 12px; }
.sfs-file > .sfs-col { flex: 1; }
.sfs-file-icon { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 16px; fill: rgba(0,0,0,.6); }
.sfs-field--file { display: flex; align-items: center; min-height: 56px; padding: 0 44px 0 16px; cursor: pointer; }
.sfs-field--file input[type="file"] { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; overflow: hidden; }
.sfs-file-text { color: var(--sfs-muted); font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sfs-field--file.has-file .sfs-file-text { color: var(--sfs-text); }
.sfs-file-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--sfs-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.sfs-file-clear:hover { background: rgba(0,0,0,.06); }

/* Batch pre-fill (v-col md=10 + RESET FORM) */
.sfs-prefill { display: flex; align-items: center; gap: 24px; margin: 32px 0 0; padding: 0 12px; }
.sfs-prefill .sfs-field { flex: 1; }
.sfs-legend { margin: 12px 0 0; padding: 0 12px; font-size: 12px; line-height: 18px; letter-spacing: .4px; color: var(--sfs-muted); }
.sfs-dot { display: inline-block; width: 12px; height: 12px; margin: 0 6px 0 10px; border-radius: 50%; vertical-align: -1px; box-shadow: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a; }
.sfs-legend .sfs-dot:first-child { margin-left: 0; }
.sfs-dot--sanger { background: #fbe2d5; border: 1px solid var(--sfs-sanger); }
.sfs-dot--float { background: #ffffff; border: 1px solid #b0b0b0; }
.sfs-required { margin: 24px 0 8px; padding: 0 12px; font-size: .8rem; color: gray; }

/* Reactions table (v-table) */
.sfs-table-wrap { overflow-x: auto; padding: 0 12px; }
.sfs-table { width: 100%; min-width: 1500px; border-collapse: collapse; border: 0; background: #fff; }
.sfs-table th {
    height: 56px; padding: 0 16px; border: 0; border-bottom: 1px solid rgba(0,0,0,.12);
    background: transparent; color: var(--sfs-text); font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap;
}
.sfs-table td { height: 52px; padding: 6px 16px; border: 0; border-bottom: 1px solid rgba(0,0,0,.12); vertical-align: top; background: transparent; }
.sfs-table tfoot td { border-bottom: 0; padding-top: 12px; }
.sfs-cell {
    width: 100%; min-width: 120px; height: 40px; margin: 0; padding: 8px 12px;
    border: 0 !important; border-radius: 4px 4px 0 0; outline: none;
    background: var(--sfs-field) !important; box-shadow: inset 0 -1px 0 var(--sfs-line) !important;
    color: var(--sfs-text); font-size: 16px; line-height: 24px;
}
.sfs-cell:focus { box-shadow: inset 0 -2px 0 var(--sfs-primary) !important; }
select.sfs-cell { padding-right: 8px; cursor: pointer; }
.sfs-cell[readonly] { background: #f5f9fc !important; color: var(--sfs-muted); }
.sfs-cell:disabled { opacity: .45; }
.sfs-position { min-width: 64px; width: 72px; text-align: center; }
.sfs-primer-choice { min-width: 180px; }
.sfs-primer-sequence { min-width: 230px; font-family: "Roboto Mono", Menlo, Consolas, monospace !important; font-size: 13px !important; }
tr.sfs-universal .sfs-primer-name, tr.sfs-universal .sfs-primer-sequence { color: var(--sfs-muted); }
.sfs-service { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 500; }

.sfs-label-cell { min-width: 210px; }
.sfs-label-wrap { display: flex; align-items: center; }
.sfs-label-wrap .sfs-dot { margin: 0 8px 0 0; background: #e0e0e0; }
.sfs-label-id { min-width: 160px; letter-spacing: .04em; }
.sfs-label-status { display: block; min-height: 14px; padding: 4px 0 0 20px; font-size: 12px; line-height: 14px; letter-spacing: .4px; color: var(--sfs-muted); max-width: 230px; }
.sfs-label-cell.is-ok .sfs-label-status { color: #2e7d32; }
.sfs-label-cell.is-error .sfs-label-status { color: var(--sfs-error); }
.sfs-label-cell.is-error .sfs-label-id { box-shadow: inset 0 -2px 0 var(--sfs-error) !important; }
.sfs-label-cell.is-pending .sfs-label-status { color: var(--sfs-border); }
.sfs-label-cell.type-sanger .sfs-label-dot { background: #fbe2d5; border: 1px solid var(--sfs-sanger); }
.sfs-label-cell.type-float .sfs-label-dot { background: #fff; border: 1px solid #b0b0b0; }

/* Buttons (v-btn, elevated) */
.sfs-btn {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
    height: 36px; min-width: 64px; padding: 0 16px !important; margin: 0;
    border: 0 !important; border-radius: 4px !important;
    box-shadow: var(--sfs-shadow);
    color: #fff !important; text-decoration: none !important;
    font-family: Roboto, sans-serif; font-size: 14px !important; font-weight: 500 !important;
    letter-spacing: 1.25px !important; line-height: 1 !important; text-transform: uppercase; white-space: nowrap;
    cursor: pointer; transition: filter .15s, box-shadow .15s;
}
.sfs-btn:hover { filter: brightness(1.08); }
.sfs-btn:disabled { cursor: default; filter: none; opacity: .75; }
.sfs-btn--primary { background: var(--sfs-primary) !important; }
.sfs-btn--secondary { background: var(--sfs-secondary) !important; }
.sfs-btn--warning { background: var(--sfs-warning) !important; }
.sfs-btn--success { background: var(--sfs-success) !important; }
.sfs-btn--small { height: 28px; padding: 0 12px !important; font-size: 12px !important; letter-spacing: 1.07px !important; }

.sfs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 24px 0 0; padding: 0 12px; }
.sfs-link { color: var(--sfs-border); font-size: 14px; }

/* Alerts (v-alert tonal) */
.sfs-alert { margin: 0 0 24px; padding: 16px; border-radius: 4px; background: #e3f2fd; color: var(--sfs-text); }
.sfs-alert-error { background: #fdecea; color: #7f1d1d; }
.sfs-alert ul { margin: 8px 0 0 18px; padding: 0; }

.sfs-table--summary { min-width: 0; }
.sfs-table--summary td { vertical-align: middle; }

.sfs-hidden { display: none !important; }

@media (max-width: 959px) {
    .sfs-row > .sfs-col { flex-basis: 100%; max-width: 100%; }
    .sfs-prefill { flex-direction: column; align-items: stretch; }
    .sfs-actions { flex-direction: column; align-items: stretch; }
}

/* The one Smart Form button in the cart / drawer, re-pointed to SMARTForm Sanger. */
.sfs-routed-smartform-button { text-align: center; }
.sfs-field.is-empty label { top: 18px; font-size: 16px; line-height: 20px; }
.sfs-field.is-empty:focus-within label { top: 8px; font-size: 12px; line-height: 16px; }

/* Primer Source (Microsynth-like) */
.sfs-th-note { display: block; font-size: 11px; font-weight: 400; color: #d32f2f; line-height: 14px; }
.sfs-th-note--muted { color: var(--sfs-muted); }
.sfs-cell[hidden] { display: none !important; }
.sfs-primer-source { min-width: 230px; }
.sfs-primer-source-fixed { min-width: 230px; background: #eeeeee !important; color: rgba(0,0,0,.7); font-weight: 500; }
tr.sfs-premixed .sfs-primer-sequence,
tr.sfs-premixed input[readonly][value="—"] { background: #eeeeee !important; }
.sfs-cell:disabled { background: #eeeeee !important; opacity: 1; color: rgba(0,0,0,.38); }

/* v2.4.0 : PCR purification option */
.sfs-purif-cell { white-space: nowrap; }
.sfs-purif { display: inline-flex; align-items: center; gap: 6px; height: 48px; cursor: pointer; font-size: 14px; color: #122F54; }
.sfs-purif input { width: 18px; height: 18px; accent-color: #0097B2; cursor: pointer; }
.sfs-purif--off { opacity: .4; cursor: not-allowed; }
.sfs-purif--off input { cursor: not-allowed; }
.sfs-purif-na { display: inline-block; line-height: 48px; color: rgba(0,0,0,.38); }
.sfs-purif-total { margin: 12px 0 0; padding: 10px 14px; background: #E3F2FD; border-left: 4px solid #0097B2; border-radius: 4px; color: #122F54; font-size: 14px; }
