@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-Bold.woff2') format('woff2');
    font-weight: 700;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-Regular.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-Light.woff2') format('woff2');
    font-weight: 300;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-ExtraLight.woff2') format('woff2');
    font-weight: 200;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-LightItalic.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Source Sans Pro';
    src: url('../fonts/SourceSansPro-ExtraLightItalic.woff2') format('woff2');
    font-weight: 200;
    font-style: italic;
}

:root {
    color-scheme: only light;
    --soft-white: rgb(251 250 245);
    --dark: rgb(52 58 64); /* bootstrap --dark color */
    --ek-yellow: rgb(254, 239, 0);
    --header-bg: rgb(56 56 56);
    --body-bg: var(--soft-white);
    --modal-bg: rgb(77 77 77);
    --text-color: var(--dark);
    --modal-glow-color: rgb(170 170 170);
    --modal-top-radius: calc(1.5rem - 1px);
    --modal-bottom-radius: calc(1.0rem - 1px);
}

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    font-family: 'Source Sans Pro', sans-serif;
}

.bg-ek-yellow {
    background-color: var(--ek-yellow);
}

.navbar.bg-ek-yellow {
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensures the shadow appears above other elements */
}

.language-flag {
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.language-switch-container {
    margin: 0.5rem 0;
}

.language-checkbox {
    display: none;
}

.language-switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* 10% black overlay for darkening */
    border-radius: inherit;
    pointer-events: none;
}

.language-switch {
    --switch-width: 120px;
    --switch-height: 40px;
    --switch-padding: 4px;
    --slider-width: 54px;

    position: relative;
    display: inline-block;
    width: var(--switch-width);
    height: var(--switch-height);
    background-color: var(--ek-yellow);
    border-radius: calc(var(--switch-height) / 2);
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.language-option {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.language-option.fi {
    left: 12px;
    top: 10px;
    opacity: 1;
}

.language-option.en {
    right: 12px;
    top: 10px;
    opacity: 0.5;
}

.language-slider {
    position: absolute;
    top: var(--switch-padding);
    left: var(--switch-padding);
    width: var(--slider-width);
    height: calc(var(--switch-height) - (var(--switch-padding) * 2));
    background-color: var(--ek-yellow);
    border-radius: calc((var(--switch-height) - (var(--switch-padding) * 2)) / 2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.language-checkbox:checked + .language-switch .language-slider {
    transform: translateX(calc(var(--switch-width) - var(--slider-width) - (var(--switch-padding) * 2)));
}

.language-checkbox:checked + .language-switch .language-option.fi {
    opacity: 0.5;
}

.language-checkbox:checked + .language-switch .language-option.en {
    opacity: 1;
}

.close-modal {
    font-size: 2rem;
    line-height: 0;
}

/* Table column width definitions using nested CSS */
#items-table {
    /* Table styling */
    table-layout: fixed;
    width: 100%;

    th, td {
        &:nth-child(1) {
            width: auto; /* Product column - flexible width */
        }

        &:nth-child(2) {
            width: 160px; /* Quantity column - fixed width */
        }

        &:nth-child(3) {
            width: 70px; /* Price column - fixed width */
        }

        &:nth-child(4) {
            width: 90px; /* Total column - fixed width */
        }
    }
}

.item-count {
    max-width: 60px;
    font-weight: 600;
}

.counter {
    .increase-count, .decrease-count {
        font-weight: 700;
        font-size: 1.5rem;
        line-height: .8rem;
        padding: 0 1.0rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Add this to prevent the input from growing too large */
.input-group-sm > .form-control.item-count {
    width: 3rem;
    min-width: 3rem;
    flex: 0 0 auto;
    padding-left: 0;
    padding-right: 0;
}


/* Add these to your home.css */
#ekorder-items-table, #ekorder-customer-form section {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #fff;
}

.table {
    margin-bottom: 0;
}

/* Table border refinements */
.table-responsive {
    border-radius: 0.25rem;
    overflow: hidden;
}