﻿/* Raspored i oblici. Sve boje elemenata definirane su u boja.css. */
body.b2b-app {
    --b2b-header-height: 128px;
    --b2b-nav-height: 72px;
    margin: 0;
    min-height: 100vh;
    font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
}

.b2b-app *, .b2b-app *::before, .b2b-app *::after {
    box-sizing: border-box;
}

.b2b-app .b2b-width {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: 20px;
}

.b2b-app .b2b-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.b2b-app .b2b-icon-small {
    width: 16px;
    height: 16px;
}

.b2b-app .b2b-svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.b2b-app .b2b-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1030;
    padding-top: env(safe-area-inset-top,0px);
}

.b2b-app .b2b-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 6px 8px;
    padding-block: 10px 12px;
    align-items: center;
}

.b2b-app .b2b-brand {
    display: none;
    font-size: 22px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.b2b-app .b2b-company {
    grid-column: 1 / -1;
    min-width: 0;
}

.b2b-app .b2b-company-link, .b2b-app .b2b-company-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    font-size: 14px;
    text-decoration: none;
}

    .b2b-app .b2b-company-link span, .b2b-app .b2b-company-name span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .b2b-app .b2b-company-link .b2b-icon-small {
        margin-left: auto;
    }

.b2b-app .b2b-search {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding-inline: 14px;
    min-width: 0;
    height: 46px;
}

    .b2b-app .b2b-search input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        font: inherit;
    }

        .b2b-app .b2b-search input:disabled {
            opacity: 1;
            cursor: not-allowed;
        }

    .b2b-app .b2b-search:focus-within {
        outline-width: 3px;
        outline-style: solid;
        outline-offset: 2px;
    }

.b2b-app .b2b-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    min-height: 46px;
    border-width: 1px;
    border-style: solid;
    border-radius: 10px;
    text-decoration: none;
}

.b2b-app .b2b-cart-label {
    display: none;
}

.b2b-app .b2b-nav {
    position: fixed;
    inset: auto 0 0;
    border-top-width: 3px;
    border-top-style: solid;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom,0px);
}

.b2b-app .b2b-nav-inner {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    padding-inline: 8px;
}

.b2b-app .b2b-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 69px;
    padding: 8px 2px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: 10px;
}

    .b2b-app .b2b-nav-link.is-active {
        font-weight: 750;
    }

        .b2b-app .b2b-nav-link.is-active .b2b-icon {
            stroke-width: 2.5;
        }

.b2b-app .b2b-main {
    padding-top: calc(var(--b2b-header-height) + 24px);
    padding-bottom: calc(var(--b2b-nav-height) + env(safe-area-inset-bottom,0px) + 24px);
}

.b2b-app .b2b-page-heading {
    margin-bottom: 20px;
}

.b2b-app h1 {
    font-size: clamp(1.4rem,3vw,1.9rem);
    font-weight: 700;
    margin: 0;
}

.b2b-app .b2b-empty {
    padding: 56px 24px;
    text-align: center;
    border-width: 1px;
    border-style: solid;
    border-radius: 16px;
}

    .b2b-app .b2b-empty .b2b-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 16px;
    }

    .b2b-app .b2b-empty p {
        margin: 0;
        line-height: 1.6;
    }

.b2b-app .b2b-options {
    border-width: 1px;
    border-style: solid;
    border-radius: 14px;
    overflow: hidden;
    max-width: 640px;
}

    .b2b-app .b2b-options > * + * {
        border-top-width: 1px;
        border-top-style: solid;
    }

    .b2b-app .b2b-options a, .b2b-app .b2b-options button, .b2b-app .b2b-option-disabled {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        width: 100%;
        padding: 18px 20px;
        text-decoration: none;
    }

    .b2b-app .b2b-options button {
        border: 0;
        font: inherit;
        cursor: pointer;
        text-align: left;
    }

    .b2b-app .b2b-options form {
        margin: 0;
    }

/* Sažeto zaglavlje bez menija koristi istu širinu kao prijavljeni prikaz. */
.b2b-app .b2b-auth-topbar {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding-block: 8px;
}

.b2b-app .b2b-auth-header .b2b-brand {
    display: block;
    min-width: 0;
    font-size: 1.125rem;
}

.b2b-app.b2b-without-nav .b2b-main {
    padding-top: calc(56px + env(safe-area-inset-top, 0px) + 24px);
    padding-bottom: 28px;
}

.b2b-app .b2b-notice {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-width: 1px;
    border-style: solid;
    border-radius: 10px;
}

.b2b-app .b2b-skip {
    position: fixed;
    left: 12px;
    top: -150px;
    z-index: 1100;
    padding: 12px;
}

    .b2b-app .b2b-skip:focus {
        top: 12px;
    }

.b2b-app a:focus-visible, .b2b-app button:focus-visible {
    outline-width: 3px;
    outline-style: solid;
    outline-offset: 3px;
}

.b2b-app .field-validation-valid, .b2b-app .validation-summary-valid {
    display: none;
}

.b2b-app #loading {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1080;
    text-align: center;
    padding-top: 35vh;
}

.b2b-app .b2b-spinner {
    display: block;
    width: 36px;
    height: 36px;
    border-width: 3px;
    border-style: solid;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: b2b-spin 1s linear infinite;
}

@keyframes b2b-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width:992px) {
    .b2b-app .b2b-topbar {
        grid-template-columns: minmax(0, auto) minmax(180px, 1fr) minmax(100px, 260px) auto auto;
        gap: 16px;
        padding-block: 18px;
    }

    .b2b-app .b2b-brand {
        display: block;
    }

    .b2b-app .b2b-search {
        grid-column: 2;
        grid-row: 1;
    }

    .b2b-app .b2b-company {
        grid-column: 3;
        grid-row: 1;
    }

    .b2b-app .b2b-cart {
        grid-column: 4;
        padding-inline: 14px;
    }

    .b2b-app .b2b-cart-label {
        display: inline;
    }

    .b2b-app .b2b-nav {
        position: static;
        border-radius: 0;
        border-top: 0;
        padding-bottom: 0;
    }

    .b2b-app .b2b-nav-inner {
        display: flex;
        gap: 8px;
        padding-inline: 20px;
    }

    .b2b-app .b2b-nav-link {
        flex-direction: row;
        gap: 10px;
        min-height: 56px;
        padding: 12px 24px;
        font-size: 15px;
        border-radius: 0;
        border-bottom-width: 3px;
        border-bottom-style: solid;
    }

    .b2b-app .b2b-main {
        padding-bottom: 40px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .b2b-app .b2b-spinner {
        animation: none;
    }
}

@media print {
    .b2b-app .b2b-header, .b2b-app .b2b-auth-header, .b2b-app .b2b-skip, .b2b-app #loading {
        display: none !important;
    }

    .b2b-app .b2b-main {
        padding: 0;
        max-width: none;
    }
}

.b2b-app .b2b-settings > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    min-height: 56px;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
}

    .b2b-app .b2b-settings > summary::-webkit-details-marker {
        display: none;
    }

    .b2b-app .b2b-settings > summary::marker {
        content: "";
    }

    .b2b-app .b2b-settings > summary:focus-visible {
        outline-width: 3px;
        outline-style: solid;
        outline-offset: -3px;
    }

.b2b-app .b2b-settings[open] > summary {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.b2b-app .b2b-settings[open] .b2b-settings-arrow {
    transform: rotate(180deg);
}

.b2b-app .b2b-settings-content > * + * {
    border-top-width: 1px;
    border-top-style: solid;
}

/* Zastava ostaje krajnje desno; okvir je dovoljno velik za dodir. */
.b2b-app .b2b-language {
    min-width: 44px;
    justify-self: end;
}

.b2b-app .b2b-language > form > .dropdown > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

@media (min-width: 992px) {
    .b2b-app .b2b-topbar > .b2b-language {
        grid-column: 5;
        grid-row: 1;
    }
}
