/* ==========================================================
   FINSEARCH PUBLIC SUBMISSION
   SINGLE IMAGE-FIRST WORKFLOW
   ========================================================== */


.fs-page {

    width:
        min(
            calc(100% - 48px),
            1040px
        );

    margin:
        0 auto;

    padding:
        48px 0 76px;

    font-family:
        "Manrope",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

}


.fs-finsearch-form {

    width:
        100%;

    margin:
        0;

}


.fs-primary-stage,
.fs-secondary-stage {

    width:
        100%;

    padding:
        30px;

    border-radius:
        13px;

    background:
        #F3F7FB;

    box-shadow:
        0 9px 26px
        rgba(17, 52, 73, .055);

}


.fs-secondary-stage {

    margin-top:
        22px;

}


.fs-stage-heading {

    margin:
        0 0 21px;

}


.fs-stage-eyebrow {

    margin:
        0 0 6px;

    color:
        #4A6574;

    font-size:
        10px;

    line-height:
        1.3;

    font-weight:
        700;

    letter-spacing:
        .14em;

    text-transform:
        uppercase;

}


.fs-stage-heading h2 {

    margin:
        0;

    color:
        #183A50;

    font-size:
        25px;

    line-height:
        1.18;

    font-weight:
        650;

    letter-spacing:
        -.03em;

}


.fs-stage-heading p {

    max-width:
        730px;

    margin:
        8px 0 0;

    color:
        #667A86;

    font-size:
        13px;

    line-height:
        1.55;

}


.fs-heading-optional {

    margin-left:
        5px;

    color:
        #82919A;

    font-size:
        11px;

    font-weight:
        500;

    letter-spacing:
        0;

}


/* ==========================================================
   IMAGE WORKSPACE
   ========================================================== */

.fs-image-workspace {

    position:
        relative;

    width:
        100%;

    overflow:
        hidden;

    border:
        1px solid
        #C7D4DB;

    border-radius:
        9px;

    background:
        #FFFFFF;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;

}


.fs-image-workspace.is-dragging {

    border-color:
        #4F829E;

    background:
        #F5FAFC;

    box-shadow:
        0 0 0 3px
        rgba(79, 130, 158, .10);

}


.fs-image-workspace-input {

    position:
        absolute !important;

    width:
        1px !important;

    height:
        1px !important;

    margin:
        -1px !important;

    padding:
        0 !important;

    overflow:
        hidden !important;

    clip:
        rect(0, 0, 0, 0) !important;

    white-space:
        nowrap !important;

    border:
        0 !important;

}


.fs-image-workspace-empty {

    min-height:
        410px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    padding:
        50px 30px;

    text-align:
        center;

    cursor:
        pointer;

}


.fs-image-workspace-icon {

    width:
        66px;

    height:
        66px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin:
        0 0 20px;

    border:
        1px solid
        #CCD9E0;

    border-radius:
        50%;

    color:
        #31566D;

    background:
        #F5F9FB;

}


.fs-image-workspace-title {

    color:
        #193B50;

    font-size:
        20px;

    line-height:
        1.3;

    font-weight:
        650;

    letter-spacing:
        -.02em;

}


.fs-image-workspace-copy {

    max-width:
        470px;

    margin:
        9px 0 0;

    color:
        #6A7C87;

    font-size:
        13px;

    line-height:
        1.55;

}


.fs-image-workspace-choose {

    min-width:
        154px;

    min-height:
        43px;

    margin:
        22px 0 0;

    padding:
        10px 21px;

    border:
        1px solid
        #1E3A53;

    border-radius:
        5px;

    background:
        #1E3A53;

    color:
        #FFFFFF;

    font:
        inherit;

    font-size:
        12px;

    font-weight:
        650;

    cursor:
        pointer;

}


.fs-image-workspace-choose:hover {

    border-color:
        #294B64;

    background:
        #294B64;

}


.fs-image-workspace-formats {

    margin:
        13px 0 0;

    color:
        #8A989F;

    font-size:
        10.5px;

    line-height:
        1.4;

}


/* ==========================================================
   IMAGE PREVIEW
   ========================================================== */

.fs-image-workspace-preview[hidden],
.fs-image-workspace-empty[hidden],
.fs-after-image[hidden] {

    display:
        none !important;

}


.fs-image-preview-canvas {

    width:
        100%;

    height:
        510px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        18px;

    overflow:
        hidden;

    background:
        #082B3D;

}


.fs-image-preview-image {

    display:
        block;

    max-width:
        100%;

    max-height:
        100%;

    width:
        auto;

    height:
        auto;

    object-fit:
        contain;

    user-select:
        none;

    -webkit-user-drag:
        none;

}


.fs-image-preview-fallback {

    max-width:
        430px;

    padding:
        20px;

    color:
        rgba(255,255,255,.78);

    font-size:
        13px;

    line-height:
        1.55;

    text-align:
        center;

}


.fs-image-preview-toolbar {

    min-height:
        72px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        24px;

    padding:
        13px 16px;

    border-top:
        1px solid
        #DBE4E8;

    background:
        #FFFFFF;

}


.fs-image-preview-file {

    min-width:
        0;

    flex:
        1 1 auto;

}


.fs-image-preview-filename {

    overflow:
        hidden;

    color:
        #233F50;

    font-size:
        12px;

    line-height:
        1.35;

    font-weight:
        650;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

}


.fs-image-preview-filesize {

    margin-top:
        3px;

    color:
        #84939B;

    font-size:
        10.5px;

}


.fs-image-preview-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

}


.fs-image-preview-action {

    min-height:
        37px;

    padding:
        8px 14px;

    border:
        1px solid
        #B8C8D1;

    border-radius:
        5px;

    background:
        #FFFFFF;

    color:
        #24475C;

    font:
        inherit;

    font-size:
        11px;

    font-weight:
        650;

    cursor:
        pointer;

}


.fs-image-preview-action-secondary {

    color:
        #687A85;

    border-color:
        #D3DDE2;

}


/* ==========================================================
   POST-IMAGE CONTENT
   ========================================================== */

.fs-after-image {

    width:
        100%;

}


.fs-field {

    width:
        100%;

    margin:
        0 0 15px;

}


.fs-field:last-child {

    margin-bottom:
        0;

}


.fs-field input,
.fs-field textarea {

    width:
        100%;

    min-height:
        48px;

    padding:
        11px 13px;

    border:
        1px solid
        #CCD5DA;

    border-radius:
        7px;

    background:
        #FFFFFF;

    color:
        #1D2F3B;

    outline:
        none;

    box-shadow:
        none;

    font:
        inherit;

    font-size:
        13.5px;

}


.fs-field textarea {

    min-height:
        105px;

    resize:
        vertical;

}


.fs-field input::placeholder,
.fs-field textarea::placeholder {

    color:
        #75828A;

    opacity:
        1;

}


.fs-field input:focus,
.fs-field textarea:focus {

    border-color:
        #7897AA;

    box-shadow:
        0 0 0 2px
        rgba(65, 111, 139, .09);

}


.fs-contact-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap:
        14px;

}


/* ==========================================================
   MAP
   ========================================================== */

.fs-location-map {

    width:
        100%;

    height:
        365px;

    margin:
        0;

    overflow:
        hidden;

    border:
        0;

    border-radius:
        7px;

    background:
        #DCE8ED;

}


.fs-location-help {

    margin:
        8px 0 0;

    color:
        #75868F;

    font-size:
        10.5px;

    line-height:
        1.5;

}


/* ==========================================================
   SUBMIT
   ========================================================== */

.fs-submit-stage {

    margin-top:
        22px;

    padding:
        24px 30px;

    border-radius:
        13px;

    background:
        #F3F7FB;

    box-shadow:
        0 9px 26px
        rgba(17, 52, 73, .055);

}


.fs-submit-copy {

    margin:
        0 0 13px;

    color:
        #5E7481;

    font-size:
        11.5px;

    line-height:
        1.5;

}


.fs-finsearch-submit {

    width:
        100%;

    min-height:
        50px;

    padding:
        11px 18px;

    border:
        1px solid
        #1E3A53;

    border-radius:
        6px;

    background:
        #1E3A53;

    color:
        #FFFFFF;

    font:
        inherit;

    font-size:
        14px;

    font-weight:
        650;

    cursor:
        pointer;

}


.fs-finsearch-submit:hover {

    border-color:
        #294B64;

    background:
        #294B64;

}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

    .fs-page {

        width:
            min(
                calc(100% - 32px),
                1040px
            );

        padding-top:
            34px;

    }


    .fs-primary-stage,
    .fs-secondary-stage,
    .fs-submit-stage {

        padding:
            23px;

    }


    .fs-image-workspace-empty {

        min-height:
            330px;

    }


    .fs-image-preview-canvas {

        height:
            410px;

    }

}


@media (max-width: 600px) {

    .fs-contact-grid {

        grid-template-columns:
            1fr;

        gap:
            0;

    }


    .fs-image-workspace-empty {

        min-height:
            285px;

        padding:
            38px 20px;

    }


    .fs-image-preview-canvas {

        height:
            330px;

        padding:
            10px;

    }


    .fs-image-preview-toolbar {

        flex-direction:
            column;

        align-items:
            stretch;

        gap:
            11px;

    }


    .fs-image-preview-actions {

        width:
            100%;

    }


    .fs-image-preview-action {

        flex:
            1 1 50%;

    }


    .fs-location-map {

        height:
            285px;

    }

}

/* FINSEARCH IMAGE REVIEW GATEWAY START */

/*
 * Scoped only to the new Suitability Check button and
 * image-review area. Existing FinSearch form styling is
 * intentionally left untouched.
 */

.fs-suitability-button {

    width: 100%;
    min-height: 49px;
    margin: 13px 0 0;
    padding: 10px 16px;

    border: 1px solid #CCD5DA;
    border-radius: 7px;

    background: #FFFFFF;
    color: #111827;

    font: inherit;
    font-size: 14px;
    font-weight: 650;

    cursor: pointer;

}


.fs-suitability-button:disabled {

    opacity: .72;
    cursor: not-allowed;

}


.fs-suitability-status {

    margin: 14px 0 0;

    color: #40596A;

    font-size: 11px;
    line-height: 1.45;

}


.fs-image-review-stage {

    margin: 18px 0 0;

}


.fs-image-review-stage[hidden] {

    display: none !important;

}


.fs-image-review-canvas {

    width: 100%;
    height: 500px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;

    overflow: hidden;

    border-radius: 7px;

    background: #082B3D;

}


.fs-image-review-image {

    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

}


.fs-image-review-fallback {

    max-width: 420px;

    color: rgba(255,255,255,.78);

    font-size: 13px;
    line-height: 1.5;

    text-align: center;

}


.fs-image-review-footer {

    margin: 0 0 14px;
    padding: 13px 2px 0;

}


.fs-image-review-title {

    color: #203B4D;

    font-size: 12px;
    line-height: 1.4;

    font-weight: 650;

}


.fs-image-review-copy {

    margin-top: 3px;

    color: #75858E;

    font-size: 10.5px;
    line-height: 1.45;

}


@media (max-width: 700px) {

    .fs-image-review-canvas {

        height: 340px;

    }

}


/* FINSEARCH PROVISIONAL BIOMETRIC VIEWER START */


/* ----------------------------------------------------------
   ATLAS-STYLE DORSAL-FIN SELECTION MODAL
   ---------------------------------------------------------- */

body.fs-fin-modal-open {
    overflow: hidden;
}


.fs-fin-modal[hidden] {
    display: none !important;
}


.fs-fin-modal {
    position: fixed;
    inset: 0;

    z-index: 20000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px;

    background: rgba(4, 18, 27, .76);

    backdrop-filter: blur(2px);
}


.fs-fin-modal-card {
    position: relative;

    width: min(980px, 96vw);
    max-height: 94vh;

    overflow: auto;

    padding: 24px;

    border-radius: 10px;

    background: #FFFFFF;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, .30);
}


.fs-fin-modal-close {
    position: absolute;

    top: 12px;
    right: 14px;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #40596A;

    font-size: 25px;
    line-height: 34px;

    cursor: pointer;
}


.fs-fin-modal-close:hover {
    background: #F1F5F7;
}


.fs-fin-modal-close:disabled {
    opacity: .35;
    cursor: not-allowed;
}


.fs-fin-modal-header {
    padding: 0 46px 16px 2px;
}


.fs-fin-modal-title {
    color: #17374A;

    font-size: 16px;
    line-height: 1.35;

    font-weight: 700;
}


.fs-fin-modal-copy {
    margin-top: 4px;

    color: #687D89;

    font-size: 12px;
    line-height: 1.5;
}


.fs-fin-modal-image-stage {
    position: relative;

    width: 100%;
    height: min(64vh, 610px);

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 8px;

    background: #082B3D;
}


.fs-fin-modal-image {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;
}


.fs-fin-modal-image.is-selecting {
    cursor: crosshair;
}


.fs-fin-modal-overlay {
    position: absolute;

    z-index: 2;

    pointer-events: none;
}


.fs-fin-modal-overlay[hidden] {
    display: none !important;
}


.fs-fin-modal-fallback {
    max-width: 430px;

    padding: 24px;

    color: rgba(255, 255, 255, .8);

    font-size: 13px;
    line-height: 1.5;

    text-align: center;
}


.fs-fin-modal-processing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 47px;

    color: #40596A;

    font-size: 12px;
}


.fs-fin-modal-processing[hidden] {
    display: none !important;
}


.fs-fin-modal-spinner {
    width: 16px;
    height: 16px;

    border: 2px solid #CFD9DE;
    border-top-color: #1E3A53;
    border-radius: 50%;

    animation:
        finsearch-spin .8s linear infinite;
}


@keyframes finsearch-spin {

    to {
        transform: rotate(360deg);
    }

}


.fs-fin-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-top: 15px;
}


.fs-fin-modal-actions[hidden] {
    display: none !important;
}


.fs-fin-modal-action {
    min-height: 48px;

    padding: 10px 16px;

    border-radius: 7px;

    font: inherit;
    font-size: 14px;
    font-weight: 650;

    cursor: pointer;
}


.fs-fin-modal-action-secondary {
    border: 1px solid #CCD5DA;

    background: #FFFFFF;
    color: #17242C;
}


.fs-fin-modal-action-primary {
    border: 1px solid #1E3A53;

    background: #1E3A53;
    color: #FFFFFF;
}


/* ----------------------------------------------------------
   SIMPLE TWO-PANEL RESULT
   ---------------------------------------------------------- */

.fs-analysis-result[hidden],
.fs-finsearch-submit[hidden] {
    display: none !important;
}


.fs-analysis-result {
    margin: 18px 0;
}


.fs-analysis-result-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 14px;

    width: 100%;
}


.fs-analysis-panel {
    margin: 0;
    padding: 0;

    min-width: 0;

    overflow: hidden;

    border: 1px solid #DCE4E8;
    border-radius: 7px;

    background: #FFFFFF;
}


.fs-analysis-panel-canvas {
    display: block;

    width: 100%;
    height: auto;

    background: #FFFFFF;
}


.fs-analysis-result-controls {
    margin-top: 12px;
}


.fs-analysis-result-controls
.fs-suitability-button {
    margin-top: 0;
}


@media (max-width: 760px) {

    .fs-fin-modal {
        padding: 12px;
    }


    .fs-fin-modal-card {
        width: 100%;
        padding: 18px;
    }


    .fs-fin-modal-image-stage {
        height: 52vh;
    }


    .fs-analysis-result-grid {
        grid-template-columns: 1fr;
    }


    .fs-fin-modal-actions {
        grid-template-columns: 1fr;
    }

}



/* ----------------------------------------------------------
   INTERACTIVE 2.5D FIN INSPECTION
   ---------------------------------------------------------- */

.fs-analysis-panel-interactive {
    position: relative;

    cursor: zoom-in;

    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}


.fs-analysis-panel-interactive:hover,
.fs-analysis-panel-interactive:focus-visible {
    border-color: #A9BAC4;

    box-shadow:
        0 8px 24px rgba(20, 48, 65, .10);

    outline: none;
}


body.fs-inspection-open {
    overflow: hidden;
}


.fs-inspection-modal[hidden] {
    display: none !important;
}


.fs-inspection-modal {
    position: fixed;
    inset: 0;

    z-index: 21000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 26px;

    background:
        rgba(3, 15, 23, .84);

    backdrop-filter:
        blur(3px);
}


.fs-inspection-shell {
    width: min(1180px, 96vw);
    height: min(820px, 94vh);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-radius: 10px;

    background: #F7F9FA;

    box-shadow:
        0 28px 80px rgba(0, 0, 0, .34);
}


.fs-inspection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 17px 20px 14px;

    border-bottom:
        1px solid #DCE4E8;

    background: #FFFFFF;
}


.fs-inspection-title {
    color: #17374A;

    font-size: 15px;
    line-height: 1.3;

    font-weight: 700;
}


.fs-inspection-copy {
    margin-top: 3px;

    color: #75858E;

    font-size: 11px;
    line-height: 1.4;
}


.fs-inspection-close {
    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #40596A;

    font-size: 27px;
    line-height: 34px;

    cursor: pointer;
}


.fs-inspection-close:hover {
    background: #EFF3F5;
}


.fs-inspection-modes {
    display: flex;
    justify-content: center;

    gap: 7px;

    padding: 10px 14px;

    border-bottom:
        1px solid #DCE4E8;

    background: #FFFFFF;
}


.fs-inspection-mode {
    min-height: 34px;

    padding: 6px 13px;

    border:
        1px solid #D6E0E5;

    border-radius: 999px;

    background: #FFFFFF;
    color: #526874;

    font: inherit;
    font-size: 11px;
    font-weight: 620;

    cursor: pointer;
}


.fs-inspection-mode.is-active {
    border-color: #1E3A53;

    background: #1E3A53;
    color: #FFFFFF;
}


.fs-inspection-viewport {
    flex: 1;

    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    padding: 26px;

    perspective: 1200px;

    background:
        radial-gradient(
            circle at 50% 45%,
            #FFFFFF 0%,
            #EDF2F4 70%,
            #E5ECEF 100%
        );

    cursor: grab;

    touch-action: none;

    user-select: none;
}


.fs-inspection-viewport.is-dragging {
    cursor: grabbing;
}


.fs-inspection-object {
    display: flex;
    align-items: center;
    justify-content: center;

    max-width: 88%;
    max-height: 88%;

    transform-style: preserve-3d;

    transition:
        transform .08s linear;

    will-change: transform;
}


.fs-inspection-viewport.is-dragging
.fs-inspection-object {
    transition: none;
}


.fs-inspection-canvas {
    display: block;

    max-width: 100%;
    max-height: 68vh;

    width: auto;
    height: auto;

    border-radius: 4px;

    box-shadow:
        0 18px 44px rgba(13, 34, 45, .18);

    transform:
        translateZ(0);
}


.fs-inspection-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 11px 18px;

    border-top:
        1px solid #DCE4E8;

    background: #FFFFFF;
}


.fs-inspection-reset {
    min-height: 35px;

    padding: 6px 14px;

    border:
        1px solid #CBD6DC;

    border-radius: 6px;

    background: #FFFFFF;
    color: #243F50;

    font: inherit;
    font-size: 11px;
    font-weight: 620;

    cursor: pointer;
}


.fs-inspection-science-note {
    color: #82919A;

    font-size: 10px;
    line-height: 1.4;

    text-align: right;
}


@media (max-width: 760px) {

    .fs-inspection-modal {
        padding: 8px;
    }


    .fs-inspection-shell {
        width: 100%;
        height: 96vh;
    }


    .fs-inspection-viewport {
        padding: 12px;
    }


    .fs-inspection-modes {
        overflow-x: auto;
        justify-content: flex-start;
    }


    .fs-inspection-footer {
        display: block;
    }


    .fs-inspection-science-note {
        margin-top: 7px;

        text-align: left;
    }

}



/* FINSEARCH FIN-ONLY WEBGL OVERRIDES START */

/*
 * Three.js now transforms the fin geometry itself.
 * The viewport and background remain stationary.
 */

.fs-inspection-object {
    width: 100%;
    height: 100%;

    max-width: none;
    max-height: none;

    transform: none !important;
    transform-style: flat;

    transition: none !important;
}


.fs-inspection-viewport.is-dragging
.fs-inspection-object {
    transform: none !important;
}


.fs-inspection-canvas {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none;
    max-height: none;

    border-radius: 0;

    background: transparent;

    box-shadow: none;

    transform: none !important;
}


.fs-inspection-viewport {
    background:
        radial-gradient(
            circle at 50% 45%,
            #FFFFFF 0%,
            #F2F5F6 60%,
            #E6ECEF 100%
        );
}

/* FINSEARCH FIN-ONLY WEBGL OVERRIDES END */

/* FINSEARCH PROVISIONAL BIOMETRIC VIEWER END */
/* FINSEARCH IMAGE REVIEW GATEWAY END */


/* FINSEARCH MAP SIZE START */

/* Match map width exactly to the rest of the FinSearch form */
#finsearchSubmissionForm #finsearchLocationMap,
#finsearchSubmissionForm .fs-location-map {
    width: 100%;
    max-width: none;
    height: 520px;
    margin: 16px 0 14px;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 900px) {
    #finsearchSubmissionForm #finsearchLocationMap,
    #finsearchSubmissionForm .fs-location-map {
        width: 100%;
        max-width: none;
        height: 460px;
    }
}

@media (max-width: 640px) {
    #finsearchSubmissionForm #finsearchLocationMap,
    #finsearchSubmissionForm .fs-location-map {
        width: 100%;
        max-width: none;
        height: 380px;
        margin: 14px 0 12px;
    }
}

/* FINSEARCH MAP SIZE END */

