/**
 * VARS
 */
:root {
    --primary-text-color: #111;
    --secondary-text-color: #777;

    --primary-text-on-dark-background-color: #fff;
    --secondary-text-on-dark-background-color: #ddd;

    --primary-theme-color: #333;
    --secondary-theme-color: #6c757d;

    --primary-accent-color:#2196F3;
    --primary-accent-color-light: #c2e2fa;
    --primary-accent-color-lighter: #e5f1fd;
    --primary-accent-color-lightest: #e9f3fd;

    --secondary-accent-color: rgb(213, 33, 86);
    --secondary-accent-color-light: rgb(236, 196, 207);
    --secondary-accent-color-lighter: rgb(245, 236, 239);
    --secondary-accent-color-lightest: rgb(248, 243, 245);
    --secondary-accent-color-dark: rgb(173, 0, 38);
    --secondary-accent-color-darker: rgb(153, 0, 35);
    --secondary-accent-color-darkest: rgb(133, 0, 30);


    --tertiary-accent-color:rgb(24, 119, 143);
    --tertiary-accent-color-dark: #0a889b;
    --tertiary-accent-color-light: #c1e5eb;
    --tertiary-accent-color-lighter: #d4ebef;

    --primary-background-color: #eef3fa;
    --secondary-background-color: #fff;

    --primary-content-background-color: #fff;
    --secondary-content-background-color: #fafafa;
}


/*
 * DEFAULT ELEMETS
 */
::placeholder {
    color: var(--secondary-text-color);
    font-family: 'Outfit', system-ui, sans-serif;
}
input {
    font-family: 'Outfit', system-ui, sans-serif;
}




/**
 * BASE
 */
body {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 1.1em;
    background-color: var(--primary-background-color);

    /* Normalize */
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    overflow: scroll;
}

/* Hide scrollbars */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}


/*
 * Text
 */
h1 {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
}

h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 5px 0;
}


/** 
 * MAIN CONTAINER
 */
.container {
    width: calc(100vw - 54px);
    margin: 10px auto;
    padding: 15px;

    background-color: var(--primary-content-background-color);
    border-radius: 10px;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.01);
}

.flexible-wrapper {
    width: 100%;
    max-width: calc(100vw - 24px);
    margin: 10px auto;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    box-sizing: content-box;
}

.flexible-container {
    background-color: var(--primary-content-background-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.flexible-inner-card {
    border: 2px solid var(--primary-accent-color-lightest);
    background-color: var(--primary-accent-color-lightest);
    border-radius: 8px;
    cursor: pointer;

    img {
        width: 100%;
        height: 100px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }

    &:hover {
        background-color: var(--primary-accent-color-light);
        transform: scale(1.05);
        transition: transform 0.2s ease-in-out;
    }

    .flexible-inner-card-title-text {
        text-align: center;
        font-weight: bold;
        font-size: 1.1em;
    }
    .flexible-inner-card-bottom-text {
        text-align: center;
        color: var(--secondary-text-color);
        padding-bottom: 10px;
    }
}

.flexible-element-two-thirds,
.flexible-element-one-third {
    flex: 1 1 100%;
    box-sizing: border-box;
}

.flexible-element-2-2-1 {
    flex: 1 1 100%;
    box-sizing: border-box;
}

.flexible-element-3-2-1 {
    flex: 1 1 100%;
    min-width: 0;
    box-sizing: border-box;
}

.flexible-element-6-4-2 {
    flex: 1 1 calc(50% - 20px);
    box-sizing: border-box;
}

.flexible-element-2-2-2 {
    flex: 1 1 calc(50% - 20px);
    box-sizing: border-box;
}

@media screen and (min-width: 980px) {
    .container {
        width: 880px;
        margin: 20px auto;
        padding: 30px;
    }

    .flexible-wrapper {
        max-width: 940px;
        margin: 20px auto;
        gap: 20px;
    }

    .flexible-element-two-thirds,
    .flexible-element-one-third {
        flex: 1 1 100%;
    }

    .flexible-element-2-2-1 {
        flex: 1 1 calc(50% - 20px);
    }

    .flexible-element-3-2-1 {
        flex: 1 1 calc(50% - 20px);
    }

    .flexible-element-3-2-2 {
        flex: 1 1 calc(50% - 20px);
    }

    .flexible-element-6-4-2 {
        flex: 1 1 calc(25% - 10px * 4);
    }
}

@media screen and (min-width: 1360px) {
    .container {
        width: 1180px;
        margin: 20px auto;
    }

    .flexible-wrapper {
        max-width: 1240px;
        margin: 0 auto;
    }

    .flexible-element-two-thirds {
        flex: 2 1 calc(66.66% - 10px);
    }

    .flexible-element-one-third {
        flex: 1 1 calc(33.33% - 10px);
    }

    .flexible-element-2-2-1 {
        flex: 1 1 calc(50% - 10px * 2);
    }

    .flexible-element-3-2-1 {
        flex: 1 1 calc(33.33% - 10px * 3);
    }

    .flexible-element-3-2-2 {
        flex: 1 1 calc(33.33% - 10px * 3);
    }

    .flexible-element-6-4-2 {
        flex: 1 1 calc(16.66% - 10px * 6);
    }
}


/** 
 * GENERAL
 */
.hide {
    display: none !important;
}
.show, .force-show {
    display: block !important;
}

@media screen and (max-width: 979px) {
    .hide-on-mobile {
        display: none;
    }
    .always-hide-on-mobile {
        display: none !important;
    }
    .always-show-on-mobile {
        display: block !important;
    }
}

@media screen and (min-width: 980px) and (max-width: 1359px) {
    .hide-on-tablet {
        display: none;
    }
    .always-hide-on-tablet {
        display: none !important;
    }
    .always-show-on-tablet {
        display: block !important;
    }
}

@media screen and (min-width: 1360px) {
    .hide-on-large {
        display: none;
    }
    .always-hide-on-large {
        display: none !important;
    }
    .always-show-on-large {
        display: block !important;
    }
    
}

@media screen and (min-width: 980px) {
    .hide-on-desktop {
        display: none;
    }
    .always-hide-on-desktop {
        display: none !important;
    }
    .always-show-on-desktop {
        display: block !important;
    }
}


/** 
 * NAVIGATION BAR
 */
.navbar {
    position: fixed;
    z-index: 1000;

    top: 0;
    left: 0;
    width: calc(100% - 74px);

    margin: 20px;
    padding: 15px;
        
    border-radius: 10px;

    background-color: var(--primary-theme-color);
    color: var(--primary-text-on-dark-background-color);

    /* pseudo element to hide stuff above the navbar */
    &::after {
        content: "";
        position: absolute;
        top: -20px;
        left: 0;
        width: 100%;
        height: 20px;
        background: var(--primary-background-color);
        pointer-events: none;
    }
    
    .title {
        font-weight: bold;
        a {
            color: var(--primary-text-on-dark-background-color);
            text-decoration: none;
        }
    }

    nav {
        width: max-content;

        a {
            padding: 10px 20px;
            border-radius: 5px;

            text-decoration: none;
            color: var(--primary-text-on-dark-background-color);

            &:hover {
                background-color: color-mix(in srgb, var(--primary-theme-color) 70%, black);
                color: var(--primary-text-on-dark-background-color);
            }
        }
    }
}

@media screen and (max-width: 1359px) {
    .navbar nav a {
        padding: 10px 12px;
    }
}


@media screen and (max-width: 979px) {
    .navbar {
        width: calc(100% - 54px);
        margin: 10px;
        height: 72px;
    }

    .navbar nav a {
        padding: 10px max(5px, 1.2vw);
    }
    
    .title {
        position: fixed;
        margin-top: -5px;
        font-size: 1.2em;
    }

    nav {
        position: fixed;
        margin-top: 50px;
        left: 50%;
        transform: translateX(-50%);
        font-size: min(3.8vw, 1em);
    }
    
    .language-switcher {
        right: 0;
        margin-top: -5px;
        margin-right: 20px;
        position: fixed;
    }
    
}

 @media screen and (min-width: 980px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
    
        .title {
            justify-self: start;
            font-size: 1.5em;
        }
    
        nav {
            font-size: 0.94em;
            font-weight: bold;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
        }
    
        .languge-switcher {
            flex-shrink: 0;
        }
    }
}


/**
 * SUB NAVIGATION
 */
 .sub-menu-container {
    top: 112px;
    position: fixed;
    display: none;

     font-size: 0.9em;

    background: white;
    border: 1px solid lightgray;
    border-radius: 0 0 8px 8px;
    padding: 10px;
    left: calc(15% - 15px);
    width: 70%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    z-index: 1001;
}

 @media screen and (min-width: 980px) {
    .sub-menu-container {
        top: 85px;
        position: fixed;
        transform: translateX(-50%);
        width: max-content;
        font-size: 1em;

        &.sub-menu-container-0 {
            left: calc(50% - 280px);
        }

        &.sub-menu-container-1 {
            left: calc(50% - 140px);
        }

        &.sub-menu-container-2 {
            left: calc(50%);
        }

        &.sub-menu-container-3 {
            left: calc(50% + 140px);
        }

        &.sub-menu-container-4 {
            left: calc(50% + 280px);
        }
    }
}

.sub-menu-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent);
    border-radius: inherit;
    pointer-events: none;
}

.sub-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
    padding: 10px 20px 10px 15px;
    border-radius: 4px;
    cursor: pointer;

    text-decoration: none;
    color: var(--primary-text-color);

    &:hover {
        background-color: rgba(0, 0, 0, 0.03);
    }
}

.sub-menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 5px;
}
@media screen and (min-width: 980px) {
    .sub-menu-item img {
        width: 32px;
        height: 32px;
        margin-right: 5px;
    }
}




/**
 * LANGUAGE SWITCHER
 */
.language-switcher button {
    background-color: #444;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    margin: 0 5px;
    cursor: pointer;

    color: var(--primary-text-on-dark-background-color);

    &:hover {
        background-color: color-mix(in srgb, var(--primary-theme-color) 70%, black);
    }
}

/* make .language-selector popover without outline but give border radius */

#language-selector[popover] {
    border: 0;
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;

    a {
        display: flex;
        align-items: center;
        text-decoration: none;
        padding: 10px;
        border-radius: 5px;
        color: #000;

        img {
            margin-right: 10px;
        }

        &:hover {
            background-color: #f4f4f4;
        }
    }
}
#language-selector[popover]::backdrop {
    background: rgba(0, 0, 0, 0.4); /* Adjust darkness */
    backdrop-filter: blur(3px);
}


/** 
 * MAIN ELEMENTS
 */
.disclaimer {
    margin: 0 auto 20px;
    width: 80%;
    max-width: 1180px;

    padding-top: 5px;
    font-size: 0.7em;
    text-align: center;
    color: var(--secondary-text-color);
}

.current-language {
    background-color: #444;
}

.current-menu-item {
    background-color: #444;
}

main {
    margin-top: 125px;
    margin-left: -6px;
}   

@media screen and (min-width: 980px) {
    main {
        margin-top: 100px;
    }
    
}


    

.infobox {
    background-color: var(--primary-accent-color-lighter);
    border-left: 6px solid var(--primary-accent-color);
    padding: 10px;
    margin-top: 20px;
    border-radius: 10px;

    p {
        margin: 0 0 10px 0;
    }

    h3 {
        margin: 0 0 10px 0;
    }
}






.spark-table-wrapper {
    height: auto;
    width: fit-content;
    margin: 0 auto;
    background: var(--primary-content-background-color);

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.02);

    font-size: 0.9em;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    overflow: auto;
}

.spark-table {
    border-spacing: 0;

    thead.sticky {
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--primary-content-background-color);
    }

    th.sticky,
    td.sticky {
        position: sticky;
        left: 0;
        background: #ebf1f6;
        text-align: left;
        font-weight: bold;
    }

    th img, td img {
        max-width: 150px;
    }

    th, td {
        padding: 18px 18px;
        border-bottom: 1px dashed #eee;
        border-right: 1px solid #ddd;
        width: 184px;
        vertical-align: top;
    }

    th:first-child, td:first-child {
        width: 150px;
    }

    tr:last-child td {
        border-bottom: none;
    }
    
    td:not(:first-child), th:not(:first-child) {
        text-align: center;
    }
}

.spark-signup-button {
    background-color: var(--tertiary-accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    text-align: center;
    font-size: 1em;
    font-weight: bold;

    /* on hover enlarge the button */
    transition: transform 0.2s ease-in-out;
    &:hover {
        transform: scale(1.05);
    }

    &:hover {
        background-color: color-mix(in srgb, var(--tertiary-accent-color) 90%, white);
    }
}

.spark-signup-bonus {
    padding: 4px 14px;

    background-color: #c1e5eb;
    border : 1px solid #0a889b;

    font-weight: normal;
    font-size: 0.9em;

    border-radius: 0 0 5px 5px;
}

.spark-menu {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    width: 100%;

    button {
        background-color: #fff;
        padding: 4px 8px 2px 8px;
        margin: 0 2px;
        border: 1px solid #ddd;
        border-bottom: none;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        cursor: pointer;
        box-shadow: inset 0 -4px 4px rgba(0, 0, 0, 0), inset 0 -4px 4px rgba(0, 0, 0, 0.05);

        &:hover {
            background-color: var(--tertiary-accent-color);
            cursor: pointer;

            img {
                filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
            }
        }


    }

    span {
        font-size: 0.92em;
    }
}

.spark-menu-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5px;
}

@media screen and (min-width: 980px) {
    .spark-menu {
        width: 944px;
        margin: 0 auto;
    }
}

@media screen and (min-width: 1360px) {
    .spark-menu {
        width: 1244px;
        margin: 0 auto;
    }
}


img.star-icon {
    filter: saturate(180%);
}

img.check-icon {
    filter: saturate(160%);
}

img.cross-icon {
    filter: saturate(180%);
}


/**
 * Spark Instant Search
 */
.spark-search-container{
    width: 61%;
    max-width: 600px;
    margin: 20px auto 20px;

    input[type="search"] {
        font-size: 1em;

        border: none;
        background-color: var(--primary-accent-color-lightest);
        padding: 15px;
        display: block;
        width: 100%;
        border-radius: 8px;
        outline: none;
        border: 4px solid transparent;

        &:focus {
            border-color: var(--primary-accent-color);
            border: 4px solid var(--primary-accent-color);
            background-color: var(--primary-content-background-color);
        }
    }

    .spark-items-container{
        margin: 10px 0;

        .spark-item {
            display: flex;
            align-items: center;
            gap: 15px;
            width: 100%;
            padding: 8px;
            border-radius: 8px;
            box-sizing: border-box;

            cursor: pointer;
        }

        .spark-search-result-col-1 {
            display: flex;
            align-items: center;
            width: 100px;
            flex-shrink: 0;

            height: 50px;
            border-radius: 8px;
            background-color: #fff;

            /* scale img to fit and center vertically and horizontally */
            img {
                width: 100%;
                height: 100%;
                object-fit: contain;
                border-radius: 8px;
            }
        }

        .spark-search-result-col-2 {
            display: flex;
            flex-direction: column;
            gap: 5px;
            flex-grow: 1;
            width: calc(100% - 100px);

            font-weight: bold;
        }
    }
}

/* on mobile set container to 100% width */
@media screen and (max-width: 979px) {
    .spark-search-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}


/*
 * Spark Offer
 */
.spark-cashback-offers-small-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.spark-cashback-offer-small {
    flex: 1;
    min-width: 0;
    text-align: left;
    border-radius: 8px;
    background-color: var(--primary-accent-color-lighter);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;

    text-decoration: none;
    color: var(--primary-text-color);

    /* slight shadow */
    border: 2px solid var(--primary-accent-color-lighter);

    /* hover animation */
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
    &:hover {
        transform: scale(1.04);
    }

    &:hover {
        background-color: var(--primary-accent-color-light);
    }
}

.spark-cashback-offer-small-description {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.spark-cashback-offer-small-image {
    width: 60px;
    height: 40px;
    flex-shrink: 0;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;

}

.spark-cashback-offer-small-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.spark-cashback-offer-small-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}




/* footer */
footer {
    width: calc(100% - 74px);
    margin: 0 auto;
    
    border-radius: 12px 12px 0 0;
    background-color: #e9ecf5;
    padding: 15px;
    margin-top: 20px;
}

@media screen and (max-width: 979px) {
    footer {
        width: calc(100% - 54px);
    }
}

.footer-nav {
    a {
        display: inline-block;
        padding: 10px 0;
        text-decoration: none;
        border-radius: 8px;
        color: var(--primary-text-color);

        &:hover {
            color: var(--secondary-accent-color-dark);
        }
    }
}


/* cashback offers */

.cashback-offer-container {
    button {
        width: 100%;
        background-color: var(--tertiary-accent-color);
        font-family: 'Outfit', system-ui, sans-serif;
        font-weight: bold;

        &:disabled {
            background-color: #aaa;
            cursor: not-allowed;

            &:hover {
                background-color: #aaa;
            }
        }
    }
}

.cashback-offer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;

    strong {
        font-weight: bold;
        font-size: 1.5em;
    }
}

.cashback-offer-col-1,
.cashback-offer-col-2,
.cashback-offer-col-3 {
    margin-bottom: 15px;
}

.cashback-offer-col-1 img {
    max-width: 200px;
    margin-right: 10px;
}

.cashback-offer-container-highlight {
    border: 1px solid #eee;
}

@media screen and (min-width: 980px) {
    .cashback-offer-container-highlight {
        border: 4px solid var(--primary-accent-color);
    }

    .cashback-offer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;

        padding: 10px 30px;

        img {
            width: 61%;
            max-height: 100%;
            object-fit: contain;
        }
    }

    .cashback-offer-col-1,
    .cashback-offer-col-2,
    .cashback-offer-col-3 {
        margin-bottom: 0;
    }

    .cashback-offer-col-1 {
        width: 23%;
    }

    .cashback-offer-col-2 {
        width: 54%;
    }

    .cashback-offer-col-3 {
        width: 23%;
        text-align: right;
    }
}

/* Margin Helpers */
.margin-top-0 {
    margin-top: 0;
}
.margin-top-5 {
    margin-top: 5px;
}
.margin-top-10 {
    margin-top: 10px;
}
.margin-top-15 {
    margin-top: 15px;
}
.margin-top-20 {
    margin-top: 20px;
}

.margin-bottom-0 {
    margin-bottom: 0;
}
.margin-bottom-5 {
    margin-bottom: 5px;
}
.margin-bottom-10 {
    margin-bottom: 10px;
}
.margin-bottom-15 {
    margin-bottom: 15px;
}
.margin-bottom-20 {
    margin-bottom: 20px;
}
