/* Isolated order-page component; global klassik.css remains generated from SCSS. */

.order-calendar-preview {
    --paper: #f5f4f0;
    --blue: var(--blue-deep);
    --line: #e5e5e0;
    margin: 56px 0 0;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    min-width: 0;
    color: var(--ink);
    font: 14px/1.65 var(--font-body);
}

.order-calendar-preview [hidden] {
    display: none !important;
}

.order-calendar-preview .preview-intro {
    margin-bottom: 20px;
}

.order-calendar-preview .preview-intro h2#order-preview-heading {
    margin: 0 0 8px;
    font-size: 26px;
}

.order-calendar-preview .preview-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.order-calendar-preview .preview-order-link {
    display: inline-block;
    margin-top: 12px;
    padding-block: 8px;
    min-height: 44px;
}

.order-calendar-preview .preview-order-return {
    margin: 24px 0 0;
}

.order-calendar-preview .preview-static-note {
    margin: 0;
    padding: 16px 24px;
    font-size: 13px;
}

.order-calendar-preview * {
    box-sizing: border-box;
}

.order-calendar-preview button,
.order-calendar-preview a {
    -webkit-tap-highlight-color: transparent;
}

.order-calendar-preview button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.order-calendar-preview button:disabled {
    opacity: .35;
    cursor: default;
}

.order-calendar-preview button:focus-visible,
.order-calendar-preview a:focus-visible,
.order-calendar-preview [tabindex]:focus-visible {
    outline: 3px solid #4a6b8a;
    outline-offset: 4px;
}

.order-calendar-preview button svg {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.order-calendar-preview .preview {
    background: white;
    border: 1px solid #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 60px -40px #14203045;
}

.order-calendar-preview .viewer {
    background: var(--paper);
    overflow: hidden;
}

.order-calendar-preview .viewer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 26px 0;
}

.order-calendar-preview .format-switch {
    display: flex;
    gap: 3px;
    padding: 4px;
    border: 1px solid #dedfd8;
    background: #e9e8e380;
    border-radius: 26px;
}

.order-calendar-preview .format-switch button {
    border: 0;
    background: transparent;
    border-radius: 22px;
    padding: 8px 17px;
    min-height: 38px;
    font-size: 12px;
    color: #747b7d;
    white-space: nowrap;
    transition: background .2s,box-shadow .2s,color .2s;
}

.order-calendar-preview .format-switch button[aria-pressed="true"] {
    background: white;
    color: var(--blue);
    box-shadow: 0 2px 7px #24344114;
}

.order-calendar-preview .format-switch button:hover {
    color: var(--blue);
}

.order-calendar-preview .viewer-controls {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
}

.order-calendar-preview .overview-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #dedfd8;
    border-radius: 24px;
    background: #ffffff80;
    font-size: 11px;
    color: var(--blue);
    transition: background .2s,border-color .2s;
}

.order-calendar-preview .overview-toggle svg {
    width: 17px;
    height: 17px;
}

.order-calendar-preview .overview-toggle:hover {
    background: white;
}

.order-calendar-preview .overview-toggle[aria-pressed="true"] {
    border-color: #9cafbd;
    background: #e8eef2;
}

.order-calendar-preview .stage {
    height: clamp(350px,48vw,590px);
    position: relative;
    isolation: isolate;
    touch-action: pan-y;
}

.order-calendar-preview .stage {
    transition: height .55s cubic-bezier(.2,.7,.2,1);
}

.order-calendar-preview .stage[data-mode="grid"] {
    height: clamp(430px,54vw,660px);
}

.order-calendar-preview .stage[data-mode="grid"][data-type="table"] {
    height: clamp(320px,38vw,460px);
}

.order-calendar-preview .stage canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity .2s;
}

.order-calendar-preview .stage[data-mode="grid"] canvas {
    cursor: pointer;
}

.order-calendar-preview .stage.is-ready canvas {
    opacity: 1;
}

.order-calendar-preview .fallback {
    position: absolute;
    inset: 7% 14%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.order-calendar-preview .fallback img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 5px 12px 24px #28303a16;
    transform: perspective(1600px) rotateY(-9deg) rotateZ(-1deg);
}

.order-calendar-preview .stage.is-ready .fallback {
    visibility: hidden;
}

.order-calendar-preview .icon-btn {
    border: 1px solid #dedfd8;
    background: #ffffff80;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.order-calendar-preview .icon-btn:hover {
    background: white;
}

.order-calendar-preview .icon-btn svg {
    width: 17px;
    height: 17px;
}

.order-calendar-preview .contact-strip {
    padding: 18px 24px 12px;
    border-top: 1px solid var(--line);
}

.order-calendar-preview .thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 3px 9px;
    scroll-snap-type: x proximity;
    scrollbar-color: #cbd0ce transparent;
    scrollbar-width: thin;
}

.order-calendar-preview .thumbnail {
    flex: 0 0 calc((100% - 120px)/13);
    min-width: 52px;
    scroll-snap-align: center;
    border: 0;
    background: transparent;
    text-align: center;
    padding: 0;
    color: #84867f;
}

.order-calendar-preview .thumbnail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 297/210;
    border-radius: 4px;
    padding: 3px;
    border: 1.5px solid transparent;
    transition: border-color .2s,background .2s;
}

.order-calendar-preview .thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid #eeeee9;
    background: #fff;
}

.order-calendar-preview .thumbnail-label {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    white-space: nowrap;
}

.order-calendar-preview .thumbnail[aria-pressed="true"] {
    color: var(--blue);
    font-weight: 700;
}

.order-calendar-preview .thumbnail[aria-pressed="true"] .thumbnail-image {
    border-color: var(--blue);
    background: #edf2f5;
}

.order-calendar-preview .thumbnail:hover .thumbnail-image {
    border-color: #b7c4cd;
}

.order-calendar-preview .page-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    min-height: 84px;
    border-top: 1px solid #efefeb;
    padding: 14px 24px;
    background: #fcfcfa;
}

.order-calendar-preview .page-navigation .icon-btn {
    background: transparent;
    width: 42px;
    height: 42px;
}

.order-calendar-preview .page-navigation .icon-btn:hover {
    background: #f0f2ee;
}

.order-calendar-preview .page-description {
    min-width: 170px;
    text-align: center;
}

.order-calendar-preview .page-name {
    display: block;
    font: 23px/1.25 Georgia,serif;
    letter-spacing: -.4px;
}

.order-calendar-preview .page-count {
    display: block;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: .07em;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.order-calendar-preview .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.order-calendar-preview dialog {
    width: min(1440px,calc(100% - 40px));
    max-height: calc(100dvh - 40px);
    padding: 0;
    border: 0;
    background: var(--paper);
    color: var(--ink);
    border-radius: 18px;
    box-shadow: 0 35px 140px #0005;
}

.order-calendar-preview dialog::backdrop {
    background: #192530c9;
    backdrop-filter: blur(6px);
}

.order-calendar-preview .dialog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 22px;
    background: white;
    border-bottom: 1px solid var(--line);
}

.order-calendar-preview .dialog-top h2 {
    font: 24px/1.25 Georgia,serif;
    margin: 0;
}

.order-calendar-preview .dialog-top p {
    font-size: 11px;
    color: var(--muted);
    margin: 2px 0 0;
}

.order-calendar-preview .dialog-image-wrap {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.order-calendar-preview .dialog-image-shield {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.order-calendar-preview .dialog-image-wrap img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 230px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 5px 24px #0002;
}

.order-calendar-preview .dialog-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 0 20px 18px;
}

.order-calendar-preview .dialog-nav span {
    min-width: 160px;
    text-align: center;
    font-size: 12px;
}

.order-calendar-preview .dialog-nav button {
    background: white;
    width: 42px;
    height: 42px;
}

.order-calendar-preview .error-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: #a92f18;
}

.order-calendar-preview .error-note[hidden] {
    display: none;
}

@media (max-width:760px) {
    .order-calendar-preview .thumbnail {
        min-width: 76px;
    }

    .order-calendar-preview .stage {
        height: clamp(280px,69vw,480px);
    }

    .order-calendar-preview .viewer-top {
        padding: 16px 17px 0;
        gap: 10px;
    }

    .order-calendar-preview .overview-toggle {
        font-size: 10px;
        padding: 8px 11px;
        gap: 6px;
    }

    .order-calendar-preview .overview-toggle svg {
        width: 15px;
        height: 15px;
    }

    .order-calendar-preview .viewer-controls {
        gap: 7px;
    }

    .order-calendar-preview .contact-strip {
        padding: 14px 16px 8px;
    }

    .order-calendar-preview .page-navigation {
        min-height: 78px;
        gap: 20px;
        padding: 12px 16px;
    }

    .order-calendar-preview .page-name {
        font-size: 22px;
    }

    .order-calendar-preview .page-description {
        min-width: 150px;
    }
}

@media (max-width:450px) {
    .order-calendar-preview .dialog-nav {
        gap: 12px;
        padding-inline: 12px;
    }

    .order-calendar-preview .dialog-nav span {
        min-width: 0;
        flex: 1;
    }

    .order-calendar-preview .dialog-nav button {
        flex: none;
    }

    .order-calendar-preview .dialog-top {
        padding: 14px 16px;
    }

    .order-calendar-preview .dialog-top h2 {
        font-size: 22px;
    }

    .order-calendar-preview .dialog-image-wrap {
        padding: 12px;
    }

    .order-calendar-preview .overview-toggle {
        max-width: 158px;
    }

    .order-calendar-preview .viewer-controls .icon-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width:350px) {
    .order-calendar-preview .viewer-top {
        padding-inline: 12px;
        gap: 6px;
    }

    .order-calendar-preview .overview-toggle {
        font-size: 9px;
        padding: 8px;
        gap: 4px;
    }

    .order-calendar-preview .overview-toggle svg {
        width: 14px;
        height: 14px;
    }

    .order-calendar-preview .viewer-controls {
        gap: 5px;
    }

    .order-calendar-preview .page-navigation {
        gap: 13px;
    }

    .order-calendar-preview .page-description {
        min-width: 142px;
    }
}

@media (max-width:600px) {
    .order-calendar-preview .viewer-top {
        flex-wrap: wrap;
    }

    .order-calendar-preview .format-switch {
        width: 100%;
        justify-content: center;
    }

    .order-calendar-preview .format-switch button {
        flex: 1;
        font-size: 11px;
        padding: 8px 12px;
    }

    .order-calendar-preview .viewer-controls {
        width: 100%;
        justify-content: space-between;
        margin-top: 2px;
    }
}

@media (max-width:600px) {
    .order-calendar-preview .stage[data-mode="grid"] {
        height: 430px;
    }

    .order-calendar-preview .stage[data-mode="grid"][data-type="table"] {
        height: 300px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .order-calendar-preview *,
    .order-calendar-preview *::before,
    .order-calendar-preview *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

.order-calendar-preview .thumbnail,
.order-calendar-preview .format-switch button {
    color: var(--muted);
}

.order-calendar-preview .format-switch button[aria-pressed="true"] {
    color: var(--blue);
}

.order-calendar-preview .dialog-top h2 {
    margin: 0;
    color: var(--ink);
}
