﻿/* ----------------------------------------------- */
/* Start Page Customisations, in one common place. */
/* Design philosophy:                              */
/*    Minimum width supported 375px (iPhone SE)    */
/* This file contains some common classes used by  */
/* various components displayed on the StartPage.  */
/* ----------------------------------------------- */

.ts-start-fade-in {
    opacity: 0;
    animation: fadeInAnimation 0.2s ease-in forwards;
}

@keyframes fadeInAnimation {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* --------- Panel sizes & common stuff ---------- */
.ts-startpage-panel-large {
    /* ReSharper gives warning for clamp! but it actually exists and works on all Browsers. */
    /*width: clamp(356px, 100%, 600px);*/
    width: 600px;
    height: 430px;
    box-sizing: border-box;
    flex-shrink: 1;
    flex-grow: 1;
}

.ts-startpage-panel-small {
    width: 356px;
    height: 160px;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
}

.ts-startpage-panel-main-title {
    font-size: 17px;
    font-weight: 700;
}

.ts-startpage-link-title {
    font-size: 14px;
    font-weight: 400;
}

.ts-startpage-item-name {
    font-size: 15px;
    font-weight: 600;
}

.ts-startpage-item-date {
    color: #7E92A2;
    font-size: 14px;
    font-weight: 400;
}

/* ----------------- Mine Kunder ----------------- */

.ts-startpage-minekunder-kunde-number {
    font-size: 48px;
}

/* --------------------- KPI --------------------- */

.ts-startpage-panel-kpi {
    width: 356px;
    height: 430px;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
}

.ts-startpage-panel-kpi-number {
    font-size: 18px;
}

/* ----------------- Neste Besøk ----------------- */
/*.ts-startpage-panel-neste-besok {
    width: 356px;
    height: 430px;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.ts-startpage-nestebesok-svg-background {
    background-image: url('/img/neste_besok_bg.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.ts-startpage-nestebesok-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 27px;
    text-align: left;
}

.ts-startpage-nestebesok-subtitle {
    font-size: 14px;
    font-weight: 400;
    line-height: 27px;
    text-align: left;
}

.ts-startpage-nestebesok-item-label {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
}

.ts-startpage-nestebesok-content {
    margin-top: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
    text-align: left;
}

.ts-startpage-nestebesok-item {
    flex: 1 1 calc(50% - 20px);
    box-sizing: border-box;
}

.ts-startpage-nestebesok-btn-container {
    max-width: 50%;
}*/

/* ---- Responsive layout for smaller screens ---- */

/* Mobile */
@media (max-width: 820px) {
    .ts-startpage-panel-large {
        width: 356px;
        height: fit-content;
    }

    /* NOTE: KEEP THIS NEED TRICK CODE FOR FUTURE REFERENCE */
    /* Restrict items to max 4 */
    /*.ts-item-restriction {
        padding-bottom: 1rem;
    }

    .ts-item-restriction .row:nth-child(n+5) {
        display: none !important;
    }*/

    .ts-kpi-wrap-820 {
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .ts-kpi-wrap-820 > span.ts-startpage-panel-kpi-number {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        display: block;
        margin-bottom: .25rem;
    }

    .ts-kpi-wrap-820 > div {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        justify-content: flex-start !important;
        gap: .25rem;
    }
}

/* Tablet */
@media (min-width: 1061px) and (max-width: 1240px) {
    .ts-startpage-panel-large {
        width: 450px;
    }
}
