﻿/* Reconnect modal */

.dup-reconnect {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    font-family: Roboto, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

html.dup-reconnect-suppress #components-reconnect-modal.components-reconnect-show,
html.dup-reconnect-suppress #components-reconnect-modal.components-reconnect-retrying,
html.dup-reconnect-suppress #components-reconnect-modal.components-reconnect-failed,
html.dup-reconnect-suppress #components-reconnect-modal.components-reconnect-rejected {
    display: none;
}

html.dup-reconnect-visible #components-reconnect-modal.components-reconnect-show,
html.dup-reconnect-visible #components-reconnect-modal.components-reconnect-retrying,
html.dup-reconnect-visible #components-reconnect-modal.components-reconnect-failed,
html.dup-reconnect-visible #components-reconnect-modal.components-reconnect-rejected {
    display: block;
}

.dup-reconnect__state {
    display: block;
}

.dup-reconnect__state--failed {
    display: none;
}

html.dup-reconnect-hard .dup-reconnect__state--waiting {
    display: none;
}

html.dup-reconnect-hard .dup-reconnect__state--failed {
    display: block;
}

.dup-reconnect__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
}

.dup-reconnect__card {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    top: 14vh;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    padding: 18px 18px 16px;
    border: 1px solid rgba(8, 123, 59, 0.18);
}

.dup-reconnect__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dup-reconnect__icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: #087B3B;
}

.dup-reconnect__title {
    font-size: 18px;
    font-weight: 700;
    color: #1f1f1f;
}

.dup-reconnect__body {
    color: #3a3a3a;
    font-size: 14px;
    line-height: 1.35;
}

.dup-reconnect__text {
    margin-bottom: 10px;
}

.dup-reconnect__progress {
    height: 8px;
    margin-top: 14px;
    background: rgba(8, 123, 59, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.dup-reconnect__bar {
    height: 100%;
    width: 35%;
    background: #087B3B;
    border-radius: 999px;
    animation: dup-reconnect-progress 1.25s ease-in-out infinite;
}

@keyframes dup-reconnect-progress {
    0% { transform: translateX(-110%); width: 32%; }
    50% { transform: translateX(45%); width: 56%; }
    100% { transform: translateX(210%); width: 32%; }
}

.dup-reconnect__failed-title {
    font-weight: 700;
    color: #b00020;
    margin-bottom: 10px;
}

.dup-reconnect__failed-actions {
    display: flex;
    justify-content: flex-end;
}

.dup-reconnect__state--failed {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    color: #5b5b5b;
}

.dup-reconnect__btn {
    appearance: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    color: #fff;
    background: #087B3B;
}

.dup-reconnect__btn:active {
    transform: translateY(1px);
}

.dup-login-submitting {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 19, 17, 0.98);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.dup-login-submitting__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 26px;
    border-radius: 18px;
    border: 1px solid rgba(43, 167, 101, 0.28);
    background: rgba(18, 28, 24, 0.96);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
    color: var(--mud-palette-text-primary);
}

.dup-login-submitting__spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--mud-palette-primary);
    animation: dup-login-spin 0.9s linear infinite;
}

.dup-login-submitting__text {
    font-weight: 700;
    letter-spacing: 0.01em;
}

@keyframes dup-login-spin {
    to {
        transform: rotate(360deg);
    }
}

.mud-button-filled:disabled {
    background: var(--mud-palette-primary-darken, #066a33) !important;
    color: var(--mud-palette-primary-text) !important;
    opacity: 0.55 !important;
}

.mud-button-outlined:disabled {
    color: rgba(255, 255, 255, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    opacity: 0.55 !important;
}

.mud-button-outlined:enabled:hover {
    background: var(--mud-palette-primary-darken, #066a33) !important;
}

.mud-button-root.mud-disabled {
    cursor: not-allowed !important;
    filter: saturate(0.45);
}

.dup-html-editor {
    overflow: hidden;
}

.dup-html-editor__toolbar {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.dup-html-editor__select {
    min-width: 140px;
}

.dup-html-editor__select--size {
    min-width: 110px;
}

.dup-html-editor__content {
    padding: 12px;
    outline: none;
    line-height: 1.45;
    overflow-y: auto;
    white-space: normal;
    word-break: break-word;
}

.dup-html-editor__content:focus {
    box-shadow: inset 0 0 0 1px rgba(59, 196, 131, 0.5);
}

.dup-html-editor__content p,
.dup-html-editor__content h1,
.dup-html-editor__content h2,
.dup-html-editor__content h3,
.dup-html-editor__content h4,
.dup-html-editor__content h5,
.dup-html-editor__content h6,
.dup-html-editor__content ul,
.dup-html-editor__content ol,
.dup-html-editor__content div {
    margin: 0 0 0.35em;
}

.dup-html-editor__content p:last-child,
.dup-html-editor__content h1:last-child,
.dup-html-editor__content h2:last-child,
.dup-html-editor__content h3:last-child,
.dup-html-editor__content h4:last-child,
.dup-html-editor__content h5:last-child,
.dup-html-editor__content h6:last-child,
.dup-html-editor__content ul:last-child,
.dup-html-editor__content ol:last-child,
.dup-html-editor__content div:last-child {
    margin-bottom: 0;
}

.dup-home-page .mud-button-filled:disabled {
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    opacity: 0.8 !important;
    filter: none !important;
}

.dup-home-page .mud-button-outlined:disabled {
    color: var(--mud-palette-action-disabled) !important;
    background: rgba(8, 123, 59, 0.1) !important;
    opacity: 1 !important;
    border: none;
}

.dup-home-page .mud-button-root.mud-disabled {
    cursor: not-allowed !important;
    filter: none !important;
}

.dup-home-page .jidelna-odhlasit:enabled {
    background-color: color-mix(in srgb, var(--mud-palette-error) 30%, transparent);
}

.dup-home-page .jidelna-odhlasit:enabled:hover {
    background-color: color-mix(in srgb, var(--mud-palette-error) 80%, transparent) !important;
}

.dup-home-page .jidelna-odhlasit-disabled:disabled {
    color: var(--mud-palette-error-text) !important;
    --mud-ripple-color: var(--mud-palette-error-text) !important;
    background-color: var(--mud-palette-error) !important;
}

.dup-home-page {
    padding-bottom: 20px;
}

.dup-home-page .dup-week-nav {
    position: sticky;
    top: 8px;
    z-index: 6;
    backdrop-filter: blur(4px);
    width: min(100%, 430px);
    margin-left: auto;
    margin-right: auto;
}

.dup-home-page .dup-week-nav-stack {
    flex-wrap: nowrap;
    justify-content: center !important;
    gap: 4px;
}

.dup-home-page .dup-week-label {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
    padding: 0 4px;
}

.dup-home-page .dup-week-nav-button {
    border-radius: 999px;
    color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}

.dup-home-page .dup-week-nav-button:hover:not(.mud-disabled) {
    background: color-mix(in srgb, var(--mud-palette-primary) 20%, transparent);
}

.dup-home-page--kiosk .mud-button-outlined:enabled:hover {
    background: transparent !important;
}

.dup-home-page--kiosk .jidelna-odhlasit:enabled:hover {
    background-color: color-mix(in srgb, var(--mud-palette-error) 30%, transparent) !important;
}

.dup-home-page--kiosk .dup-week-nav-button:hover:not(.mud-disabled) {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}

.dup-appbar-page-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 0;
    max-width: min(42vw, 360px);
    padding: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    z-index: 2;
    pointer-events: auto;
}

.dup-appbar-week-nav {
    position: relative;
    width: auto;
    min-width: 0;
    max-width: 100%;
}

.dup-appbar-week-nav .dup-week-nav-stack {
    gap: 0;
    justify-content: center !important;
    flex-wrap: nowrap;
}

.dup-appbar-week-nav .dup-week-label {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
}

.dup-appbar-week-nav .mud-icon-button {
    width: 30px;
    height: 30px;
    padding: 3px;
}

.dup-appbar-week-nav .dup-week-nav-button {
    background: transparent;
}

.dup-appbar-week-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
}

.dup-logout-form {
    margin: 0;
}

.dup-native-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 64px;
    height: 36px;
    border: 0;
    border-radius: 4px;
    background: var(--mud-palette-error);
    color: var(--mud-palette-error-text);
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.75;
    padding: 6px 16px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.dup-native-logout-button:hover,
.dup-native-logout-button:focus-visible {
    background: var(--mud-palette-error-darken);
    outline: none;
}

.dup-native-logout-button--small {
    height: 30px;
    font-size: 0.8125rem;
    padding: 4px 10px;
}

.dup-native-logout-button__icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.dup-appbar-logout-button {
    border-radius: 999px;
    font-weight: 700;
    padding-inline: 14px;
    box-shadow: 0 8px 18px rgba(176, 0, 32, 0.18);
}

.dup-appbar-logout-button:hover {
    box-shadow: 0 10px 22px rgba(176, 0, 32, 0.24);
}

@media (max-width: 960px) {
    .dup-appbar-page-content {
        max-width: min(38vw, 320px);
    }

    .dup-appbar-logout-button {
        min-width: 0;
        padding-inline: 12px;
    }
}

.dup-home-page .dup-day-card {
    scroll-margin-top: 80px;
}

.dup-home-page .dup-day-head {
    gap: 8px;
}

.dup-home-page .dup-day-title-wrap {
    min-width: 0;
}

.dup-home-page .dup-day-title {
    white-space: nowrap;
}

.dup-home-page .dup-day-state {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    font-size: 1rem;
    line-height: 1.35;
}

.dup-home-page .dup-soup-row {
    width: 100%;
    gap: 8px;
    padding: 0 16px;
    box-sizing: border-box;
}

.dup-home-page .dup-soup-text {
    flex: 1;
    min-width: 0;
    padding: 0 16px;
}

.dup-home-page .dup-soup-allergens {
    white-space: nowrap;
    flex-shrink: 0;
}

.dup-home-page .dup-side-badge {
    border-width: 2px;
}

.dup-home-page .dup-choice-btn {
    min-height: 58px;
}

.dup-home-page .dup-option-row {
    width: 100%;
    gap: 8px;
}

.dup-home-page .dup-option-text {
    flex: 1;
    min-width: 0;
    text-align: left;
    line-height: 1.25;
}

.dup-home-page .dup-side-modal {
    max-height: min(84vh, 760px);
    overflow: auto;
    padding: 18px;
}

.dup-home-page .dup-side-modal-meal {
    padding: 10px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 20%, transparent);
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 55%, transparent);
    line-height: 1.28;
}

.dup-home-page .dup-side-choice-btn {
    min-height: 78px;
    font-size: 1.03rem;
    font-weight: 700;
    border-radius: 14px;
}

.dup-day-scroll-controls {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(10%, env(safe-area-inset-bottom));
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dup-day-scroll-button {
    width: 52px;
    height: 52px;
    border-radius: 999px !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.dup-day-scroll-controls--kiosk .dup-day-scroll-button:hover {
    background-color: var(--mud-palette-primary) !important;
}

.dup-day-jump-controls {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    top: max(80px, env(safe-area-inset-top) + 80px);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dup-day-jump-controls--hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.dup-day-jump-button {
    width: 52px;
    height: 52px;
    border-radius: 999px !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    min-width: auto;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.dup-day-jump-controls--kiosk .dup-day-jump-button:hover {
    background-color: var(--mud-palette-primary) !important;
}

.dup-celebration {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
}

.dup-celebration__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 247, 214, 0.9) 20%, rgba(255, 215, 112, 0.5) 48%, rgba(16, 24, 40, 0.14) 100%);
    backdrop-filter: blur(4px) saturate(1.1);
    animation: dup-celebration-backdrop 2.8s ease-out forwards;
}

.dup-celebration__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.dup-celebration__card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    place-items: center;
    padding: 26px 30px 30px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 24px 90px rgba(15, 23, 42, 0.24);
    transform: translateY(26px) scale(0.86);
    opacity: 0;
    animation: dup-celebration-card 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dup-celebration__art-wrap {
    display: grid;
    place-items: center;
}

.dup-celebration__art {
    width: min(34vw, 240px);
    height: auto;
    display: block;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.18));
    animation: dup-celebration-float 1.2s ease-in-out infinite alternate;
}

.dup-celebration__headline {
    text-align: center;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #a34700;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.dup-celebration.is-visible .dup-celebration__backdrop {
    animation-duration: 2.8s;
}

@keyframes dup-celebration-card {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8) rotate(-1deg);
    }

    16% {
        opacity: 1;
        transform: translateY(0) scale(1.04) rotate(1deg);
    }

    30% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }

    85% {
        opacity: 1;
        transform: translateY(-4px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
}

@keyframes dup-celebration-backdrop {
    0% {
        opacity: 0;
    }

    16% {
        opacity: 1;
    }

    86% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes dup-celebration-float {
    from {
        transform: translateY(0) rotate(-1deg);
    }

    to {
        transform: translateY(-10px) rotate(1deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dup-celebration__card,
    .dup-celebration__backdrop,
    .dup-celebration__art {
        animation: none !important;
    }

    .dup-celebration__card {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smaller screens */
@media (max-width: 600px) {
    .dup-reconnect__card {
        margin: 0 14px;
        top: 10vh;
    }

    .dup-home-page.mud-container--gutters {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .dup-home-page .dup-week-nav {
        top: 4px;
    }

    .dup-appbar-week-nav .dup-week-label {
        font-size: 0.76rem;
    }

    .dup-home-page .dup-week-nav-stack {
        gap: 2px;
    }

    .dup-home-page .dup-day-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .dup-home-page .dup-day-title {
        font-size: 1.1rem;
    }

    .dup-home-page .dup-day-state {
        margin-left: 0;
        width: 100%;
        text-align: left;
        white-space: normal;
        font-size: 1rem;
        line-height: 1.35;
    }

    .dup-home-page .dup-soup-row {
        padding: 0 4px;
        flex-wrap: wrap;
    }

    .dup-home-page .dup-soup-text {
        padding: 0 4px;
    }

    .dup-home-page .dup-soup-allergens {
        margin-left: 4px;
    }

    .dup-home-page .dup-choice-btn {
        min-height: 62px;
    }

    .dup-home-page .dup-option-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .dup-home-page .dup-side-modal {
        margin: auto 0 0 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        max-height: 78vh;
        padding: 14px 12px 16px 12px;
    }

    .dup-home-page .dup-side-choice-btn {
        min-height: 90px;
        font-size: 1.12rem;
    }

    .dup-day-scroll-controls {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        gap: 8px;
    }

    .dup-day-scroll-button {
        width: 48px;
        height: 48px;
    }

    .dup-celebration__card {
        margin: 0 10px;
        padding: 22px 18px 24px;
        width: calc(100% - 20px);
        max-width: 420px;
    }

    .dup-celebration__art {
        width: min(58vw, 220px);
    }

    .dup-celebration__headline {
        font-size: clamp(1.8rem, 9vw, 3.4rem);
    }

    .dup-day-scroll-controls,
    .dup-day-jump-controls {
        display: none;
    }
}

.dup-home-page .dup-week-nav--top {
    position: static;
    top: auto;
}

@media (min-width: 601px) and (max-width: 960px) {
    .dup-home-page .dup-week-nav--top {
        display: none;
    }

    .dup-day-scroll-controls,
    .dup-day-jump-controls {
        display: none;
    }
}
