@font-face {
    font-family: 'VELUX Transform';
    src: url('../fonts/velux-transform-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Galibier';
    src: url('../fonts/galibier-bold-5a445cc4.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

h1:focus {
    outline: none;
}

.velux-blue {
    background-color: rgb(217, 225, 224);
}

.velux-beige {
    background-color: rgb(235, 230, 222);
}

.border-velux-blue {
    border-color: rgb(217, 225, 224) !important;
}

/* ===== Compact Appbar ===== */
.appbar-compact {
    min-height: 40px !important;
    height: 40px !important;
}

    .appbar-compact .mud-toolbar {
        min-height: 40px !important;
        height: 40px !important;
        padding: 0 8px;
    }

.appbar-logo {
    height: 30px;
    filter: brightness(0) invert(1);
    pointer-events: none;
}

.appbar-menu-btn {
    padding: 4px !important;
    margin-left: 8px !important;
}

@media (max-width: 600px) {
    .appbar-compact {
        min-height: 36px !important;
        height: 36px !important;
    }

        .appbar-compact .mud-toolbar {
            min-height: 36px !important;
            height: 36px !important;
            padding: 0 4px;
        }

    .appbar-logo {
        height: 18px;
    }

    .mud-main-content {
        padding-top: var(--mud-appbar-height) !important;
    }

    .mud-main-content .mt-4 {
        margin-top: 0 !important;
    }
}

/* Language selector — fixed bottom-right */
.lang-fab {
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 1200;
}

@media (max-width: 600px) {
    .lang-fab {
        bottom: 8px;
        right: 8px;
    }
}

/* ===== MudBlazor layout offsets (no contact bar) ===== */
.mud-appbar.mud-appbar-fixed-top {
    top: 0 !important;
}

.mud-drawer {
    margin-top: 0 !important;
    height: calc(100vh - var(--mud-appbar-height)) !important;
}

.mud-main-content {
    padding-top: var(--mud-appbar-height) !important;
    padding-bottom: 120px !important;
}

/* ===== Cart pill button ===== */
.cart-pill {
    text-transform: none !important;
    min-width: unset !important;
    padding: 2px 10px 2px 6px !important;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 20px !important;
    line-height: 1.4;
}

/* ===== Splash / Loading Screen ===== */
.splash-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e1e 0%, #e22222 100%);
    z-index: 9999;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: -5rem;
}

.splash-logo {
    width: 380px;
    animation: splashFadeIn 1s ease-out;
    filter: brightness(0) invert(1);
    margin-left: 2%;
    margin-right: 2%;
}

.splash-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: splashSpin 0.8s linear infinite;
}

.splash-text {
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-align: center;
    min-height: 1.6em;
    transition: opacity 0.4s ease;
}

@keyframes splashSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes splashFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== End Splash Screen ===== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGl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xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

@media print {
    .no-print {
        display: none;
    }

    .print-container {
        width: 100%;
    }

    .page-break {
        page-break-after: always;
        break-after: page;
    }
}

.mud-input-control {
    margin-top: 10px;
}

/* ===== Configurator card grid ===== */

/* Equal-height cards: grid items stretch, cards fill height */
.configurator-grid.mud-grid {
    display: flex;
    flex-wrap: wrap;
}

.configurator-grid > .mud-grid-item {
    display: flex;
}

/* ===== Expanding panels — category selection ===== */
.panels {
    display: flex;
    gap: 8px;
    height: clamp(400px, 65vh, 600px);
    padding: 4px 0;
}

.panels__item {
    position: relative;
    flex: 1;
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: rgb(235, 230, 222);
    transition: flex 0.5s cubic-bezier(.4, 0, .2, 1),
                filter 0.4s ease;
}

/* Hovered panel grows, others shrink */
.panels:hover .panels__item {
    flex: 0.6;
    filter: brightness(0.85);
}

.panels:hover .panels__item:hover {
    flex: 3;
    filter: brightness(1);
}

.panels__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(.4, 0, .2, 1);
}

.panels__item:hover img {
    transform: scale(1.05);
}

.panels__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px 12px;
    pointer-events: none;
}

.panels__label {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    letter-spacing: 0.3px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    transition: font-size 0.4s ease;
}

.panels__item:hover .panels__label {
    font-size: 1.4rem;
}

.panels__check {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 1;
}

.panels__item--selected {
    outline: 3px solid var(--mud-palette-primary);
    outline-offset: -3px;
}

.panels__item--selected::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 3px var(--mud-palette-primary);
    pointer-events: none;
}

/* Tablet: still horizontal but shorter */
@media (max-width: 960px) {
    .panels {
        height: clamp(300px, 50vh, 450px);
    }
}

/* Mobile: vertical stack */
@media (max-width: 600px) {
    .panels {
        flex-direction: column;
        height: auto;
        gap: 8px;
    }

    .panels__item {
        flex: none !important;
        height: 120px;
        filter: brightness(1) !important;
    }

    .panels__item:hover img {
        transform: none;
    }

    .panels__label {
        font-size: 1.1rem;
        white-space: normal;
    }
}
/* ===== End Expanding panels ===== */

    .configurator-grid > .mud-grid-item > .mud-card {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

        .configurator-grid > .mud-grid-item > .mud-card > .mud-card-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

/* 5 items per row on large screens (lg ≥ 1280px) */
@media (min-width: 1280px) {
    .configurator-grid > .mud-grid-item {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Image area */
.configurator-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 270px;
}

/* Larger image for window category cards (step 0) */
.configurator-card-img-lg {
    height: auto;
    width: 100%;
    aspect-ratio: 4 / 3;
}

/* Smaller image for accessoire types & products */
.configurator-card-img-sm {
    height: 220px;
    max-width: 220px;
    margin: 0 auto;
}

.configurator-card-img img {
    transition-property: transform;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: 1s;
}

.configurator-card-img:hover img {
    transform: scale(1.05);
}

/* Description text — multiline, subtle color */
.configurator-card-desc {
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(0,0,0,0.55);
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Card rounding — all configurator cards */
.configurator-grid > .mud-grid-item > .mud-card {
    border-radius: 16px;
    overflow: hidden;
}

/* ===== End Configurator card grid ===== */

/* ===== Welcome hero ===== */
.welcome-hero {
    padding: 80px 0 100px;
    min-height: 480px;
    margin-top:80px;
}

.welcome-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    gap: 64px;
}

.welcome-hero-text {
    flex: 1;
    min-width: 0;
}

.welcome-greeting {
    font-weight: 700 !important;
    margin-bottom: 8px !important;
}

.welcome-heading {
    font-weight: 600 !important;
    margin-bottom: 16px !important;
    line-height: 1.3 !important;
}

.welcome-desc {
    color: rgba(0,0,0,0.55);
    line-height: 1.7 !important;
    max-width: 560px;
}

.welcome-hero-image {
    flex: 0 0 45%;
    max-width: 45%;
}

    .welcome-hero-image img {
        width: 100%;
        height: auto;
        border-radius: 16px;
        object-fit: cover;
        max-height: 480px;
    }

@media (max-width: 960px) {
    .welcome-hero-inner {
        flex-direction: column;
        padding: 0 24px;
        gap: 40px;
    }

    .welcome-hero-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .welcome-hero {
        padding: 48px 0 64px;
    }
}
/* ===== End Welcome hero ===== */
