/* =========================================================
   NIKOTAXI - HORISONTAL VAKTLISTE
   Biler nedover - datoer bortover
========================================================= */


/* =========================================================
   HOVEDKORT / SCROLL
========================================================= */

.test-vaktliste-card {
    width: 100%;
    min-width: 0;
}

.test-vaktliste-scroll {
    width: 100%;
    max-height: calc(100vh - 250px);

    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    border: 1px solid #334155;
    border-radius: 14px;

    background: #0f172a;
}


/* =========================================================
   TABELL
========================================================= */

.test-vaktliste-tabell {
    width: max-content;
    min-width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    table-layout: fixed;
}

.test-vaktliste-tabell th,
.test-vaktliste-tabell td {
    height: 48px;
    padding: 7px 9px;

    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;

    color: #ffffff;

    text-align: center;
    vertical-align: middle;

    white-space: nowrap;
}


/* =========================================================
   STICKY HEADER
========================================================= */

.test-vaktliste-tabell thead th {
    position: sticky;
    top: 0;

    z-index: 20;

    background: #1e293b;
}


/* =========================================================
   HJØRNE
========================================================= */

.test-hjorne {
    left: 0;

    z-index: 40 !important;

    width: 158px;
    min-width: 158px;

    background: #1e293b;

    text-align: left !important;
}


/* =========================================================
   DATO
========================================================= */

.test-dato {
    width: 105px;
    min-width: 105px;
}

.test-dato small {
    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================================
   BIL
========================================================= */

.test-bil {
    position: sticky;
    left: 0;

    z-index: 12;

    width: 82px;
    min-width: 82px;

    padding-right: 6px;
    padding-left: 8px;

    background: #172033;

    color: #ffffff;

    font-size: 13px;
    font-weight: 900;

    text-align: left !important;
}


/* =========================================================
   DAG / KVELD
========================================================= */

.test-skifttype {
    position: sticky;
    left: 82px;

    z-index: 11;

    width: 76px;
    min-width: 76px;

    padding-right: 5px;
    padding-left: 8px;

    overflow: hidden;

    color: #cbd5e1 !important;

    background: #111827;

    font-weight: 800;

    text-align: left !important;
}


/* Dag */
tr.test-bil-start .test-skifttype {
    color: #fff7d6 !important;

    background:
        linear-gradient(
            135deg,
            #713f12 0%,
            #a16207 55%,
            #ca8a04 100%
        );
}

tr.test-bil-start .test-skifttype::before {
    margin-right: 6px;

    content: "☀";

    color: #fde047;

    font-size: 16px;
}


/* Kveld */
tr.test-bil-start + tr .test-skifttype {
    color: #dbeafe !important;

    background:
        linear-gradient(
            135deg,
            #172554 0%,
            #1e3a8a 55%,
            #312e81 100%
        );
}

tr.test-bil-start + tr .test-skifttype::before {
    margin-right: 6px;

    content: "☾";

    color: #dbeafe;

    font-size: 17px;
}


/* =========================================================
   VAKTCELLER
========================================================= */

.test-vaktcelle {
    width: 105px;
    min-width: 105px;

    background:
        var(
            --test-celle-farge,
            #bbb
        );
}

.test-vaktcelle .celle-navn {
    overflow: hidden;

    color: #111827;

    font-weight: 800;

    text-overflow: ellipsis;
}


/* =========================================================
   NY BIL
========================================================= */

.test-bil-start > * {
    border-top: 2px solid #64748b;
}


/* =========================================================
   REDIGERING
========================================================= */

.test-vaktcelle.editable-cell {
    cursor: pointer;
}

.test-vaktcelle.editable-cell:hover {
    filter: brightness(1.08);
}


/* =========================================================
   STATUS - FRI / OFF
========================================================= */

.test-vaktcelle.offcelle {
    background: #475569;
}


/* =========================================================
   STATUS - SYK
========================================================= */

.test-vaktcelle.sykcelle {
    background: #dc2626;
}


/* =========================================================
   STATUS - PLIKT
========================================================= */

.test-vaktcelle.pliktcelle {
    position: relative;
}

.test-vaktcelle.pliktcelle::after {
    position: absolute;

    top: 3px;
    right: 4px;

    content: "🔔";

    font-size: 12px;
}


/* =========================================================
   LEDIGE CELLER
========================================================= */

.test-er-ledig .celle-navn {
    color: rgba(15, 23, 42, 0.60);

    font-style: italic;
    font-weight: 700;
}


/* Dag - svak bakgrunn */
tr.test-bil-start
.test-vaktcelle.test-er-ledig:not(.sykcelle):not(.offcelle) {
    background-image:
        linear-gradient(
            rgba(250, 204, 21, 0.10),
            rgba(250, 204, 21, 0.10)
        );
}


/* Kveld - svak bakgrunn */
tr.test-bil-start
+ tr
.test-vaktcelle.test-er-ledig:not(.sykcelle):not(.offcelle) {
    background-image:
        linear-gradient(
            rgba(30, 58, 138, 0.18),
            rgba(30, 58, 138, 0.18)
        );
}


/* =========================================================
   HELG
========================================================= */

.test-helg {
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.07)
        );
}


/* =========================================================
   VALGT RAD / KOLONNE / CELLE
========================================================= */

.test-valgt-rad > .test-skifttype {
    color: #ffffff !important;
    background: #1d4ed8;
}

.test-valgt-kolonne {
    box-shadow:
        inset 2px 0 0 rgba(59, 130, 246, 0.75),
        inset -2px 0 0 rgba(59, 130, 246, 0.75);
}

.test-valgt-celle {
    position: relative;

    z-index: 5;

    outline: 3px solid #ffffff;
    outline-offset: -3px;
}


/* =========================================================
   FILTER
========================================================= */

.test-filter-skjult {
    opacity: 0.12;
}

.test-kolonne-skjult {
    display: none;
}


/* =========================================================
   FORKLARING / LEGENDE
========================================================= */

.test-forklaring {
    display: flex;
    flex-wrap: wrap;

    gap: 8px 16px;

    margin-bottom: 12px;
    padding: 9px 12px;

    color: #cbd5e1;

    font-size: 12px;
    font-weight: 700;

    border: 1px solid #334155;
    border-radius: 10px;

    background: #0f172a;
}

.test-forklaring span {
    display: inline-flex;

    align-items: center;

    gap: 6px;
}

.test-symbol {
    display: inline-block;

    width: 13px;
    height: 13px;

    border: 1px solid #64748b;
    border-radius: 3px;
}

.test-symbol-ledig {
    background: #bbb;
}

.test-symbol-syk {
    background: #dc2626;
}

.test-symbol-fri {
    background: #475569;
}


/* =========================================================
   TOOLBAR / FILTER
========================================================= */

.test-toolbar {
    display: flex;
    flex-wrap: wrap;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 12px;
    padding: 12px;

    border: 1px solid #334155;
    border-radius: 12px;

    background: #111827;
}

.test-toolbar-gruppe {
    display: flex;
    flex-wrap: wrap;

    align-items: end;

    gap: 8px;
}

.test-toolbar label {
    display: flex;
    flex-direction: column;

    gap: 4px;

    color: #94a3b8;

    font-size: 12px;
    font-weight: 800;
}

.test-toolbar select,
.test-toolbar-knapp {
    min-height: 38px;

    padding: 7px 11px;

    color: #ffffff;

    font: inherit;
    font-weight: 800;

    border: 1px solid #475569;
    border-radius: 8px;

    background: #1e293b;
}

.test-toolbar-knapp {
    cursor: pointer;
}

.test-toolbar-knapp:hover,
.test-toolbar-knapp.er-aktiv {
    border-color: #3b82f6;

    background: #2563eb;
}

.test-ledig-filter {
    flex-direction: row !important;

    align-items: center;

    min-height: 38px;
}

.test-ledig-filter input {
    width: 18px;
    height: 18px;
}


/* =========================================================
   SIDETITTEL
========================================================= */

.test-vaktliste-side .page-title-row {
    position: relative;

    display: flex;

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

    width: 100%;
    min-height: 52px;
}

.test-vaktliste-side .app-title {
    margin-right: auto;
    margin-left: auto;

    text-align: center;
}


/* =========================================================
   HAMBURGER
========================================================= */

.test-vaktliste-side .menu-button {
    position: absolute;

    top: 50%;
    right: 0;
    left: auto;

    margin: 0;

    transform: translateY(-50%);
}


/* =========================================================
   MÅNED / ÅR ØVERST
========================================================= */

.test-vaktliste-side
.vakt-header-card
.month-nav-button,

.test-vaktliste-side
.vakt-header-card
.swipe-hint {
    display: none;
}

.test-vaktliste-side
.vakt-header-card
.header,

.test-vaktliste-side
.vakt-header-card
.header-center,

.test-vaktliste-side
.vakt-header-card
.nav-wrapper {
    width: 100%;
}

.test-vaktliste-side
.vakt-header-card
.header-center,

.test-vaktliste-side
.vakt-header-card
.nav-wrapper {
    display: flex;

    align-items: center;
    justify-content: center;
}

.test-vaktliste-side
.vakt-header-card
.month-title {
    display: flex;
    flex-direction: column;

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

    margin-right: auto;
    margin-left: auto;

    text-align: center;
}

.test-vaktliste-side
.vakt-header-card
.month {
    order: 1;

    color: #ffffff;

    font-size: 28px;
    font-weight: 900;
}

.test-vaktliste-side
.vakt-header-card
.year {
    order: 2;

    margin-top: 3px;

    color: #94a3b8;

    font-size: 16px;
    font-weight: 700;
}


/* =========================================================
   MÅNEDSNAVIGASJON UNDER TABELLEN
========================================================= */

.test-vaktliste-side
.test-maanedsnavigasjon {
    display: flex !important;

    align-items: center;
    justify-content: space-between !important;

    width: 100%;

    gap: 12px;

    margin-top: 14px;
    padding: 12px;

    box-sizing: border-box;

    border: 1px solid #334155;
    border-radius: 12px;

    background: #111827;
}

.test-vaktliste-side
.test-maaned-visning {
    display: none !important;
}

.test-vaktliste-side
.test-maanedsknapp {
    display: inline-flex;

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

    min-width: 150px;
    min-height: 42px;

    padding: 9px 14px;

    color: #ffffff;

    text-decoration: none;
    font-weight: 800;

    border: 1px solid #475569;
    border-radius: 9px;

    background: #1e293b;
}

.test-vaktliste-side
.test-maanedsknapp:first-child {
    margin-right: auto;
}

.test-vaktliste-side
.test-maanedsknapp:last-child {
    margin-left: auto;
}

.test-vaktliste-side
.test-maanedsknapp:hover {
    border-color: #3b82f6;

    background: #2563eb;
}


/* =========================================================
   FULL PC-BREDDE
========================================================= */

@media (min-width: 901px) {

    .test-vaktliste-side .page {
        width: 100%;
        max-width: none;
    }

    .test-vaktliste-side .app-wrap {
        width: 100%;
        max-width: none;

        padding-right: 20px;
        padding-left: 20px;
    }

    .test-vaktliste-side .vakt-card,
    .test-vaktliste-side .test-vaktliste-card {
        width: 100%;
        max-width: none;
    }

    .test-vaktliste-side .test-vaktliste-scroll {
        width: 100%;
        max-width: none;
    }
}


/* =========================================================
   FILTER I SIDEMENY
========================================================= */

.test-vaktliste-side
.side-menu
.test-toolbar-i-meny {
    display: block;

    width: 100%;

    margin: 0 0 16px;
    padding: 4px 0 18px;

    border: 0;
    border-bottom: 1px solid #334155;

    background: transparent;
}

.test-vaktliste-side
.side-menu
.test-toolbar-i-meny::before {
    display: none;

    content: none;
}

.test-vaktliste-side
.side-menu
.test-toolbar-i-meny
.test-toolbar-gruppe {
    display: grid;

    grid-template-columns: 1fr;

    gap: 11px;

    width: 100%;
}

.test-vaktliste-side
.side-menu
.test-toolbar-i-meny label {
    display: grid;

    grid-template-columns: 1fr;

    gap: 5px;

    width: 100%;

    color: #94a3b8;

    font-size: 13px;
    font-weight: 800;
}

.test-vaktliste-side
.side-menu
.test-toolbar-i-meny select {
    width: 100%;
    min-height: 42px;

    color: #ffffff;

    border: 1px solid #475569;
    border-radius: 8px;

    background: #1e293b;
}


/* =========================================================
   SAMMENLEGGBAR UNDERMENY
========================================================= */

.test-vaktliste-side
.test-undermeny-knapp {
    display: flex;

    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 46px;

    padding: 10px 4px;

    color: #ffffff;

    font: inherit;
    font-size: 16px;
    font-weight: 800;

    border: 0;

    background: transparent;

    cursor: pointer;
}

.test-vaktliste-side
.test-undermeny-knapp:hover {
    color: #60a5fa;
}

.test-vaktliste-side
.test-undermeny-pil {
    color: #94a3b8;

    font-size: 19px;
}

.test-vaktliste-side
.test-toolbar-gruppe[hidden],

.test-vaktliste-side
.test-meny-plasseringsvalg[hidden] {
    display: none !important;
}


/* =========================================================
   BILFILTER
========================================================= */

#testBilFilter[hidden] {
    display: none !important;
}

.test-bilvalg-liste {
    display: grid;

    gap: 6px;

    width: 100%;
}

.test-bilvalg {
    display: grid !important;

    grid-template-columns:
        20px
        1fr !important;

    align-items: center;

    gap: 9px !important;

    min-height: 38px;

    padding: 7px 9px;

    color: #ffffff !important;

    border: 1px solid #334155;
    border-radius: 8px;

    background: #111827;

    cursor: pointer;
}

.test-bilvalg input {
    appearance: none;

    width: 17px !important;
    height: 17px !important;

    margin: 0;

    border: 2px solid #64748b;
    border-radius: 50%;

    background: transparent;
}

.test-bilvalg input:checked {
    border-color: #60a5fa;

    background: #2563eb;

    box-shadow:
        inset 0 0 0 3px #111827;
}


/* =========================================================
   MOBIL
========================================================= */

@media (max-width: 700px) {

    .test-vaktliste-scroll {
        max-height: calc(100vh - 205px);

        border-radius: 10px;
    }

    .test-hjorne {
        width: 142px;
        min-width: 142px;
    }

    .test-bil {
        width: 74px;
        min-width: 74px;

        font-size: 11px;
    }

    .test-skifttype {
        left: 74px;

        width: 68px;
        min-width: 68px;

        font-size: 11px;
    }

    .test-dato,
    .test-vaktcelle {
        width: 88px;
        min-width: 88px;
    }

    .test-vaktliste-tabell th,
    .test-vaktliste-tabell td {
        height: 44px;

        padding: 5px 7px;

        font-size: 12px;
    }

    tr.test-bil-start
    .test-skifttype::before,

    tr.test-bil-start
    + tr
    .test-skifttype::before {
        display: block;

        margin-right: 0;
        margin-bottom: 2px;

        font-size: 13px;

        text-align: center;
    }

    .test-vaktliste-side
    .page-title-row {
        min-height: 48px;

        padding-right: 52px;
        padding-left: 52px;
    }

    .test-vaktliste-side
    .menu-button {
        right: 4px;
    }
}


/* =========================================================
   MÅNEDSKNAPPER MOBIL
========================================================= */

@media (max-width: 600px) {

    .test-vaktliste-side
    .vakt-header-card
    .month {
        font-size: 24px;
    }

    .test-vaktliste-side
    .vakt-header-card
    .year {
        font-size: 14px;
    }

    .test-vaktliste-side
    .test-maanedsnavigasjon {
        display: grid !important;

        grid-template-columns:
            1fr
            1fr;

        gap: 8px;
    }

    .test-vaktliste-side
    .test-maanedsknapp {
        width: 100%;
        min-width: 0;

        margin: 0 !important;

        font-size: 13px;
    }
}


/* =========================================================
   MENYPLASSERING BARE PÅ MOBIL
========================================================= */

@media (min-width: 701px) {

    .test-meny-innstillinger {
        display: none;
    }
}
/* =========================================================
   FINGER OVER DAGENS DATO
========================================================= */

.vaktliste-horisontal-side
.test-i-dag {
    box-shadow: none !important;
}


.vaktliste-horisontal-side
.test-dato.test-i-dag {
    position: sticky;
    padding-top: 25px;
}


/* Fingeren som beveger seg ned mot datoen */
.vaktliste-horisontal-side
.test-dato.test-i-dag::before {
    position: absolute;

    top: 1px;
    left: 50%;

    content: "👇";

    font-size: 18px;
    line-height: 1;

    transform:
        translateX(-50%)
        translateY(-4px);

    animation:
        test-finger-trykk
        2.2s
        ease-in-out
        infinite;

    pointer-events: none;
}


/* Selve datotallet presses ned */
.vaktliste-horisontal-side
.test-dato.test-i-dag > span {
    display: inline-block;

    animation:
        test-dato-trykk
        2.2s
        ease-in-out
        infinite;
}


@keyframes test-finger-trykk {

    0%,
    20%,
    75%,
    100% {
        transform:
            translateX(-50%)
            translateY(-4px);
    }

    38%,
    55% {
        transform:
            translateX(-50%)
            translateY(4px);
    }
}


@keyframes test-dato-trykk {

    0%,
    32%,
    68%,
    100% {
        transform:
            translateY(0);
    }

    42%,
    56% {
        transform:
            translateY(4px);
    }
}


/* Respekter enhetens innstilling for redusert bevegelse */
@media (prefers-reduced-motion: reduce) {

    .vaktliste-horisontal-side
    .test-dato.test-i-dag::before,

    .vaktliste-horisontal-side
    .test-dato.test-i-dag > span {
        animation: none;
    }

    .vaktliste-horisontal-side
    .test-dato.test-i-dag::before {
        transform:
            translateX(-50%)
            translateY(0);
    }
}