﻿/* ==================================================
   BORRHÅL / MILJÖPROVER
   ================================================== */

.boreholePanel {
    margin-top: 4px;
}


.boreholeProfileLayout {
    display: block;
}


.boreholeVisualAndDetails {
    display: block;
}


.boreholeEmpty {
    padding: 8px 0;
    color: #666666;
    font-style: italic;
}


/* ==================================================
   PROFILVY
   ================================================== */

.boreholeProfileVisual {
    margin-top: 8px;
    margin-bottom: 18px;
    border-radius: 8px;
    overflow: hidden;
    background: #d0a173;
    box-shadow: inset 0 0 0 1px rgba(120, 88, 55, 0.30);
}


/* ==================================================
   HIMMEL + GRÄS
   ================================================== */

.boreholeHeaderTexture {
    height: 52px;
    background-image: url("../images/borehole_header.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}


/* ==================================================
   JORDTEXTUR
   ================================================== */

.boreholeSoilTexture {
    position: relative;
    height: 360px;
    background-image: url("../images/borehole_soil.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}


/* ==================================================
   NIVÅLINJER / DJUPAXEL
   ================================================== */

.boreholeGuideLines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}


.boreholeGuideLine {
    position: absolute;
    left: 38px;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.38);
}


/* ==================================================
   DJUPTEXT
   ================================================== */

.boreholeDepthTick {
    position: absolute;
    left: 10px;
    transform: translateY(-50%);
    padding: 2px 4px;
    color: rgba(255, 255, 255, 0.98);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    z-index: 3;
}


/* ==================================================
   SAMPLE-LANE
   Ger lite jord synlig på sidorna.
   ================================================== */

.boreholeSampleLane {
    position: absolute;
    top: 0;
    right: 12px;
    bottom: 0;
    left: 42px;
    z-index: 3;
}


/* ==================================================
   PROVSKIVOR
   ================================================== */

.boreholeSample {
    position: absolute;
    left: 12px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0;
    border: 1px solid rgba(80, 80, 80, 0.55);
    border-radius: 1px;
    cursor: pointer;
    box-sizing: border-box;
    background-clip: padding-box;
    transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}


    /* ==================================================
   HOVER
   ================================================== */

    .boreholeSample:hover {
        transform: scale(1.01);
        z-index: 4;
        filter: brightness(1.04) saturate(1.04);
    }


    /* ==================================================
   VALT PROV
   ================================================== */

    .boreholeSample.selected {
        z-index: 6;
        border: 2px solid #ffffff !important;
        box-shadow: none;
        filter: brightness(1.08) saturate(1.05);
    }


/* ==================================================
   PROVLABEL
   ================================================== */

.boreholeSampleLabel {
    padding: 2px 10px;
    margin: 0 6px;
    border-radius: 3px;
    background: rgba(255, 250, 240, 0.90);
    color: #333333;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
}


/* ==================================================
   KLASSFÄRGER FÖR PROVINTERVALL
   ================================================== */

.severity-ok {
    background: rgba(55, 180, 85, 0.42);
    border-color: rgba(30, 125, 55, 0.95);
}


.severity-mrr {
    background: rgba(255, 226, 0, 0.78);
    border-color: rgba(205, 165, 0, 1);
}


.severity-km {
    background: rgba(255, 170, 0, 0.76);
    border-color: rgba(205, 125, 0, 1);
}


.severity-mkm {
    background: rgba(220, 0, 145, 0.58);
    border-color: rgba(165, 0, 105, 1);
}


.severity-fa {
    background: rgba(230, 35, 35, 0.64);
    border-color: rgba(175, 0, 0, 1);
}


.severity-none {
    background: rgba(120, 120, 120, 0.10);
    border-color: rgba(120, 120, 120, 0.35);
}


/* ==================================================
   DETALJER FÖR VALT PROV
   ================================================== */

.boreholeDetails {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    padding: 0 12px 4px 12px;
    box-sizing: border-box;
}


.boreholeDetailsTitle {
    margin: 0 0 10px 0;
    color: #28476b;
    font-size: 16px;
    font-weight: 700;
}


.boreholeSampleMeta {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #333333;
}


    .boreholeSampleMeta strong {
        font-weight: 700;
    }


/* ==================================================
   RESULTATTABELL
   ================================================== */

.boreholeResultsTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}


    .boreholeResultsTable th,
    .boreholeResultsTable td {
        padding: 8px 8px;
        border-bottom: 1px solid #e3e3e3;
        text-align: left;
        vertical-align: top;
        word-break: break-word;
    }


    .boreholeResultsTable thead th {
        background: #f3f4f6;
        color: #333333;
        font-weight: 700;
    }


    .boreholeResultsTable th:nth-child(1),
    .boreholeResultsTable td:nth-child(1) {
        width: 36%;
    }


    .boreholeResultsTable th:nth-child(2),
    .boreholeResultsTable td:nth-child(2) {
        width: 28%;
    }


    .boreholeResultsTable th:nth-child(3),
    .boreholeResultsTable td:nth-child(3) {
        width: 36%;
    }


    /* ==================================================
   SVAG RADFÄRGNING
   ================================================== */

    .boreholeResultsTable
    .row-ok {
        background: rgba(55, 180, 85, 0.07);
    }


    .boreholeResultsTable
    .row-mrr {
        background: rgba(255, 226, 0, 0.18);
    }


    .boreholeResultsTable
    .row-km {
        background: rgba(255, 170, 0, 0.16);
    }


    .boreholeResultsTable
    .row-mkm {
        background: rgba(220, 0, 145, 0.11);
    }


    .boreholeResultsTable
    .row-fa {
        background: rgba(230, 35, 35, 0.12);
    }


    .boreholeResultsTable
    .row-none {
        background: transparent;
    }


    /* ==================================================
   VÄNSTERKANT FÖR KLASSNING
   ================================================== */

    .boreholeResultsTable
    .row-ok
    td:first-child {
        box-shadow: inset 3px 0 0 rgba(30, 125, 55, 0.45);
    }


    .boreholeResultsTable
    .row-mrr
    td:first-child {
        box-shadow: inset 3px 0 0 rgba(205, 165, 0, 0.90);
    }


    .boreholeResultsTable
    .row-km
    td:first-child {
        box-shadow: inset 3px 0 0 rgba(205, 125, 0, 0.90);
    }


    .boreholeResultsTable
    .row-mkm
    td:first-child {
        box-shadow: inset 3px 0 0 rgba(165, 0, 105, 0.85);
    }


    .boreholeResultsTable
    .row-fa
    td:first-child {
        box-shadow: inset 3px 0 0 rgba(175, 0, 0, 0.90);
    }


/* ==================================================
   RESPONSIVT
   ================================================== */

@media ( max-width: 1100px ) {

    .boreholeHeaderTexture {
        height: 46px;
    }


    .boreholeSoilTexture {
        height: 340px;
    }


    .boreholeSampleLane {
        left: 38px;
        right: 10px;
    }


    .boreholeGuideLine {
        left: 34px;
    }


    .boreholeDepthTick {
        left: 8px;
        font-size: 12px;
    }


    .boreholeSample {
        left: 10px;
        right: 10px;
    }
}
