/*
 * invoice-ocr — page styles (was inline <style> in invoice-ocr.blade.php).
 * Loaded only by that view, right after new-theme/style.css, so rules here
 * affect this tool only.
 */
/* ===================== 1. Passport + ID Card ===================== */
@media screen and (max-width: 767px) {
    .mg-sm-bottom-20 {
        margin-bottom: 20px !important;
    }

}

.idco-extract-fields-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
}

.idco-extract-field-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
}

/* Chips flow as inline text with balanced line wrapping, so the last row
is never a lone orphan (flex-wrap left "Signature" alone on row 2).
The mobile/tablet media query below still switches to a 2-col grid. */
/* Mobile + tablet: fields become a left-aligned 2-column grid, and the
how-it-works steps stack in one column with horizontal dividers. */
/* Passport-only: the shared fixed `left: 32%` line cut through the wide
(landscape) passport "Before" image, so the divider is the Before
column's own right border instead — it always sits after its content. */
@media screen and (min-width: 768px) {
/* Vertical padding moves from card-body to the columns so the
    border runs the card's full height, like the Figma divider. */
}

/* ============================================================
Results field list (Figma "ID Card OCR Done development" →
results frame, node 1984078543): a plain label/value field
list, not invoice-ocr's spreadsheet grid — see generateTable()
override + idCardOcrJsonToDataArray() comments in this page's
script block. kv_label mirrors .preview_table th's bold/muted
look; kv_value is the editable field.
============================================================ */
/* ============================================================
Results field list (same as id-card-ocr's results frame): a plain label/value field
list, not invoice-ocr's spreadsheet grid — see generateTable()
override + passportOcrJsonToDataArray() comments in this page's
script block. kv_label mirrors .preview_table th's bold/muted
look; kv_value is the editable field.
============================================================ */
/* Grow with the field list instead of the shared fixed-height,
scrolling .preview-body box. */
/* One continuous underline per label+value pair: it sits on the
<tr>, not the cells, so it never breaks between the two. */
/* Desktop pairs two fields per row (Name | Date Of Birth, ...) with a
vertical rule between the columns. generateTable() still emits one
<tr> per field so copy/export keep reading "one <tr> = one field";
the tbody becomes a 2-column grid of <tr>s instead. Card headings
and spacers span both columns so each card starts on a fresh row. */
@media screen and (min-width: 992px) {
/* Last pair of the list has no underline either. */
}

/* ============================================================
Results header (Figma results frame): Start Over / QR / Copy /
single "Download" dropdown, instead of the shared "Export As"
+ "Download All" pair. Scoped to .idco-output-stage so
invoice-ocr/passport-ocr/bank-statement-converter, which reuse
the same .output_stage/.export_all/.download_all classes from
the shared new-theme stylesheet, keep their own layout —
desktop only (>=992px), matching the Figma frame supplied.
============================================================ */
/* One height/font for every results action button (header and files
panel), so they always line up. The shared stylesheet forces some
of them (.startover/.export_all/.download_all) to 42px/16px with
!important at <=1500px but not the others — hence !important below. */
@media screen and (min-width: 992px) {
/* new-qr.png is itself the bordered 50x50 button face. */
/* .export_all::after draws its caret via `content: url(...)` sized
    off Bootstrap's border-triangle box model; a real <img> in the
    markup (idco-download-arrow) is simpler to size and colour. */
/* The header's own bottom border is the divider here. */
}

/* ============================================================
Action tooltips (data-idco-tip="..."): CSS-only, so they also
cover buttons created later in JS. Shown on hover/keyboard focus
on pointer devices only — a tap on touch screens would leave a
hover tooltip stuck — plus whenever JS adds .idco-tip-show (Copy's
"Copied!" feedback, which is how touch users see it).
data-idco-tip-align="start|end" pins the bubble to that edge of
the button so it can't run off-screen at either side.
============================================================ */
/* Not while its dropdown is open, or before the action is ready. */
/* ============================================================
Download dropdown (header + mobile file cards): a floating white
card with roomy rows, instead of the shared .export_menu's fixed
107px purple-bordered box with an <hr> between items.
============================================================ */
/* ============================================================
Download QR popup: title, caption, QR in a soft-bordered box,
then a full-width .xlsx / .csv segmented toggle.
============================================================ */
/* ============================================================
Files panel (Figma results frame): a stack of plain image
thumbnails (no filename/size text once a file has moved into
the results list) with a "Download All" button pinned under
them. Scoped to .idco-files-list/.files_list .output_file so
the pre-convert staging grid (#uploaded_row, which still wants
filename/size/status text) and every other tool sharing
.files_list/.output_file are unaffected.
============================================================ */
@media screen and (min-width: 992px) {
/* Error state: dimmed/blurred thumbnail + warning icon overlay,
    instead of the plain "Error" text this span shows elsewhere.
    Base stays hidden (matches the shared .d-none default); JS
    already does single_item.querySelector('.error')
    .classList.remove('d-none') on failure — this just restyles
    what appears once that happens. */
/* Per-file conversion progress as a dark overlay on the thumbnail
    itself, instead of the progress bar/% rendering as its own row
    below the (now full-width) image — the .jpgtoexceluploadloader
    element is already toggled d-none on/off by the existing
    convertBtn handler (JS untouched), this just repositions and
    restyles it in this panel; every other tool sharing that class
    keeps its inline bar-next-to-filename layout. */
/* No per-file edit/copy/export hover icons on the thumbnails —
    those actions live in the results header (Copy/Download) for
    the currently active file, or in the QR modal's This File
    format toggle; a hover-icon row on every thumbnail duplicated
    that and wasn't wanted here. */
/* Visible divider between the files panel and the results
    panel (Figma results frame shows a clear vertical line
    between the two, not just whitespace). */
/* new-qr.png is itself the bordered 50x50 button face. */
}

/* Mobile/tablet (Figma mobile results frame): every file is a card —
thumbnail, name/size/status and Copy + Download on top, its field
list underneath once expanded — and the files-panel footer becomes
a sticky bottom bar ("✓ Your File is Converted" / Download All (N) /
start over). The desktop results header isn't used here, except as
the way out when every file failed (.idco-failed). */
@media screen and (max-width: 991px) {
/* Keep the page end reachable above the fixed bottom bar. */
}

/* ===================== 2. Invoice ===================== */
/* ============================================================
Vertical rhythm (Figma: every static content section's Layout
panel shows 70px top/bottom padding). The shared includes use
Bootstrap's my-5 (48px margin) instead, and how_to/faq wrap in
".container_fluid" (underscore, not a real Bootstrap class, no
side padding) while the rest use ".container-fluid"/".container"
(hyphen, ~12px side padding) — misaligning their headings.
Scoped under .ioc-sections and kept inline on this page only, so
the shared includes and every other tool keep their own design.
Same fix pattern as vcf-to-excel/pdf-to-excel earlier this session.
============================================================ */
.ioc-sections>div {
    padding-top: 70px !important;
    padding-bottom: 70px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.gap-4 {
    gap: 20px !important;
}

.ioc-sections>.container_fluid {
    padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5);
    padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5);
}

/* key_features renders transparent (shows the page's white
background) by default; Figma specifies #FAFAFA for this
section on this page. */
.ioc-sections>div:has(.why_our_section_main) {
    background-color: #fafafa;
}

@media screen and (min-width: 768px) and (max-width: 991.98px) {
    .ioc-sections>div {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }
}

@media screen and (max-width: 767.98px) {
    .ioc-sections>div {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

}

/* ============================================================
Process Steps v2 — invoice-ocr's own variant of the shared
process_steps component (new-theme.includes.process_steps_v2),
matched exactly against the Figma "How Does This Invoice
Scanner Work?" frame: dashed connector line, light-purple
(#F3EFFF) badge fill, stacked title/body (not inline). Kept
on this page only, under its own process_step_v2_* classes,
so the shared process_steps component (and any other tool
that adopts it later) keeps its own plain default styling —
same convention as vcf-to-excel's who_can_use_v2.
============================================================ */
.process_step_v2_group {
    position: relative;
    max-width: 808px;
    margin: 24px auto 0;
}

.process_step_v2_group::before {
    content: '';
    position: absolute;
    top: 35px;
    bottom: 35px;
    left: 30px;
    width: 0;
    border-left: 1.5px dashed var(--action_color);
}

.process_step_v2_card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    border-radius: 10px;
    padding: 20px 15px;
    box-shadow: 0px 0px 4px 0px #00000026;
}

.process_step_v2_card+.process_step_v2_card {
    margin-top: 30px;
}

.process_step_v2_number {
    width: 30px;
    height: 30px;
    border: 0.3px solid var(--action_color);
    border-radius: 4.66px;
    background: #F3EFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--action_color);
    flex-shrink: 0;
}

.process_step_v2_content {
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: left;
}

.process_step_v2_content p {
    display: block;
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 25px;
}

.process_step_v2_title {
    display: block;
    font-size: 20px;
    font-weight: 600;
    line-height: 100%;
}

.formats_table_v2 {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 20px;
}

.formats_table_v2 th,
.formats_table_v2 td {
    border-bottom: 1px solid #cecece;
    border-right: 1px solid #cecece;
    padding: 10px 30px;
    height: 67px;
    text-align: center;
    vertical-align: middle;
}

.formats_table_v2 th {
    border-top: 1px solid #cecece;
    font-weight: 700;
    font-size: 18px;
}

.formats_table_v2 td {
    font-weight: 400;
    font-size: 16px;
}

.formats_table_v2 th:first-child,
.formats_table_v2 td:first-child {
    border-left: 1px solid #cecece;
}

.formats_table_v2 tr:first-child th:first-child {
    border-top-left-radius: 10px;
}

.formats_table_v2 tr:first-child th:last-child {
    border-top-right-radius: 10px;
}

.formats_table_v2 tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.formats_table_v2 tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

@media screen and (max-width: 500px) {
    .formats_table_v2 th,
    .formats_table_v2 td {
        padding: 10px 15px;
        height: auto;
    }

}

.input_vs_output_v2_card {
    position: relative;
    margin: 0 20px;
}

.input_vs_output_v2_card .card-body {
    padding: 30px 20px;
}

.input_vs_output_v2_card::after {
    content: "";
    position: absolute;
    width: 1px;
    height: 100%;
    background-color: #c3bebe;
    top: 0;
    left: 30%;
}

@media screen and (max-width: 800px) {
    .input_vs_output_v2_card img {
        width: 100%;
    }

    .input_vs_output_v2_card::after {
        display: none;
    }

}

@media screen and (max-width: 500px) {
    .input_vs_output_v2_card {
        background-color: transparent !important;
        border: none !important;
    }

    .input_vs_output_v2_card::after {
        content: none;
    }

}

/* ===================== 3. CS-7868 design-QA fixes ===================== */
/* ---------- Hero feature chips ---------- */
.feature_box_row .feature_box img[src*="batch_processing"] {
    width: 20px;
    height: 20px;
}

/* ---------- How to use ---------- */
/* Subtitle → illustration gap is 40px in Figma (an override elsewhere
dropped the mg-lg-bottom-40 utility to 16px). */
.text-center>p:has(+ .col-lg-7 .how_to_steps_main) {
    margin-bottom: 40px !important;
}

/* Editor leftovers (a lone <br> line / empty <p>) made one step taller than
the others, so the step gaps looked unequal. */
.how_to_steps .step_content div:has(> br:only-child),
.how_to_steps .step_content p:empty {
    display: none;
}

.how_to_steps .step_content p {
    margin-bottom: 0;
}

/* Illustration sits closer to the steps, like the Figma frame. */
@media (min-width: 768px) {
    .row:has(> .how_to_steps_main)>.col-md-6:first-child {
        padding-right: 8px;
    }

    .row:has(> .how_to_steps_main)>.how_to_steps_main {
        padding-left: 8px;
    }

}

/* ---------- Key features cards ---------- */
.why_our_section_main .card h3 {
    font-weight: 600;
}

/* ---------- Extracted fields chips ---------- */
.idco-extract-field-chip {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

/* ---------- Checklist with image ---------- */
.checklist_image_items li {
    font-size: 18px;
    font-weight: 600;
}

/* ---------- Who can use cards ---------- */
.who-can-use-container .card h3 {
    font-weight: 600;
    line-height: 25px;
}

/* ---------- Input / output format tables ---------- */
.formats_table_v2 th,
.formats_table th {
    font-size: 20px;
    font-weight: 600;
}

/* ---------- Your image vs output ---------- */
.container-fluid:has(> .col-xl-8 .input_vs_output_v2_card)>.text-center>p {
    font-size: 16px;
    font-weight: 400;
}

.input_vs_output_v2_card h3 {
    font-size: 18px;
    font-weight: 700;
}

/* ---------- Results header ---------- */
.output_stage .startover,
.idco-output-stage .startover {
    border-radius: 10px !important;
}

/* ================= Mobile (Figma 360 frame) ================= */
@media (max-width: 767.98px) {
/* How to use: 20px above and below the illustration, 14px steps. */
    .row:has(> .how_to_steps_main)>.col-md-6:first-child {
        margin-top: 20px;
        margin-bottom: 20px !important;
    }

    .how_to_steps_main {
        margin-top: 0 !important;
    }

    .how_to_steps .step_content {
        max-width: 100%;
        font-size: 14px !important;
        font-weight: 400;
    }

    .how_to_steps .how_to_step_heading {
        font-size: 14px !important;
        font-weight: 600;
    }

    .text-center>p:has(+ .col-lg-7 .how_to_steps_main) {
        margin-bottom: 0 !important;
    }

/* 30px number circles for the 14px steps (same as png-to-word), with
    the connector line re-anchored to them. */
    .how_to_steps .step_number {
        flex-shrink: 0;
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .how_to_steps:has(+ .how_to_steps)::after {
        top: 30px;
        left: 15px;
    }

/* Key features: cards use the full width, icon closer to title,
    14px description. */
    .why_our_section_main {
        --bs-gutter-x: 0;
    }

    .why_our_section_main .card-body>.d-flex {
        gap: 10px !important;
    }

    .why_our_section_main .card-body {
        font-size: 14px;
    }

    .why_our_section_main .card-body p {
        font-size: 14px;
    }

/* Extracted fields: less side padding so the heading fits in 2 lines. */
    .idco-extract-fields>.col-lg-9 {
        margin-left: 16px !important;
        margin-right: 16px !important;
    }

/* Checklist with image: 23px side padding. */
    .checklist_image_section>.col-xl-8 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 23px;
        padding-right: 23px;
    }

/* Who can use: tighter title line height. */
    .who-can-use-container .card h3 {
        line-height: 25px;
    }

    .checklist_image_items li {
        font-size: 16px;
        font-weight: 400;
    }

/* Format tables: 400/16px cells, less space around "Output Formats". */
    .formats_table_v2 td,
    .formats_table td {
        font-size: 14px !important;
        font-weight: 400;
    }

    .formats_table_v2_mobile~h2,
    .container:has(.formats_table_v2) h2 {
        margin-top: 20px !important;
        margin-bottom: 16px !important;
    }

/* Your image vs output: no gap under the subtitle, image edge-to-edge. */
    .container-fluid:has(> .col-xl-8 .input_vs_output_v2_card)>.text-center>p {
        margin-bottom: 0 !important;
    }

    .input_vs_output_v2_card {
        margin: 0 !important;
    }

/* Was 20px card margin + 20px body padding per side; Figma keeps 16px. */
    .input_vs_output_v2_card .card-body {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

/* People also ask: less side padding, 600 questions. */
    .faq-column {
        padding-left: 0;
        padding-right: 0;
    }

    .faq_header .accordion-button {
        font-weight: 600 !important;
        padding-left: 0;
        padding-right: 0;
    }

    .faq-column .accordion-body {
        padding-left: 0;
        padding-right: 0;
    }

}

/* ===================== 4. Pro banner / sidebar ===================== */
.pro-bg {
    background-image: url("../minified/bg-black.png");
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

.upgrade_banner {
    background-image: url("../imgs/upgrade-banner.png");
    background-size: cover;
    padding: 24px 34px;
    line-height: 30px;
}

.item .data_img {
    padding: 0;
}

.bg_crop {
    background: #5994D9CC;
}

.crop_btn {
    position: absolute;
    display: flex;
    background: #5994D9CC;
    border-radius: 50px;
    cursor: pointer;
    padding: 5px;
    top: 5px;
    left: 5px;
    z-index: 1;
}

.cancelBtn {
    display: flex;
    background: #fff;
    border-radius: 50px;
    cursor: pointer;
    padding: 6px;
    top: 7px;
}

.crossBtn {
    display: flex;
    background: #fff;
    border-radius: 50px;
    cursor: pointer;
    padding: 6px;
    position: absolute;
    top: 15px;
    right: 15px
}

.preview_table_btn {
    background: #fff !important;
    display: flex;
    align-items: center;
    width: 36px;
    height: 26px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 6px;
}

.resultBar.active {
    background: #30619A1A !important;
    border: 1px solid #30619A;
}

.download_btn {
    width: 36px;
    height: 26px;
    padding: 0 !important;
    justify-content: center;
    border-radius: 6px;
}

.download_more {
    padding: 5px 8px !important;
    border-radius: 0 6px 6px 0;
    box-shadow: none;
}

.form-switch .form-check-input {
    width: 2.2em;
    height: 20px;
}

.height_500 {
    height: 500px !important;
}

@media (max-width: 991px) {
    .crop_btn {
        background: #00000066;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 18px;
        color: #fff;
        border-radius: 0 0 8px 8px;
        padding: 4px 0px;
        top: auto;
        bottom: 0;
        left: 0;
    }

}

@media (max-width: 430px) {
    .download_more+.choose_dropdown {
        width: 335% !important;
        right: 0;
    }

    .convert_files {
        min-width: 120px;
        text-align: center;
        padding: 0;
    }

}
