@font-face {
    font-family: "Astra Calendar Montserrat";
    src: url('constructor/assets/ui.woff') format('woff');
    font-display: swap;
}

.astra-photo-calendar-table { overflow-x: auto; max-width: 100%; }
.astra-photo-calendar-table .widefat { width: max-content; min-width: min(100%, 680px); }
.astra-photo-calendar-table select { max-width: 215px; }
.astra-photo-calendar-table input[step="0.01"] { width: 8em; }

.astra-photo-calendar-calc {
    --photo-blue: var(--astra-ui-accent, #224ca4);
    --photo-border: var(--astra-ui-border, #cdd7e4);
    --photo-ink: var(--astra-ui-ink, #253457);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
    margin: 18px 0 26px;
    color: var(--photo-ink);
    font: 400 14px/1.45 var(--astra-ui-font, "Astra Calendar Montserrat", Arial, sans-serif);
}
.astra-photo-calendar-controls, .astra-photo-calendar-scene {
    background: #fff;
    border: 1px solid var(--photo-border);
    border-radius: 8px;
    margin: 0;
    min-width: 0;
}
.astra-photo-calendar-controls { padding: clamp(14px, 2vw, 22px); }
.astra-photo-calendar-calc h2 { margin: 0 0 16px; color: inherit; font-family: inherit; font-size: 22px; font-weight: 700; line-height: 1.25; }
.astra-photo-calendar-calc fieldset { margin: 0 0 15px; min-inline-size: 0; padding: 0; border: 0; }
.astra-photo-calendar-calc legend { margin: 0 0 7px; padding: 0; color: inherit; font: 650 16px/1.25 var(--astra-ui-font, "Astra Calendar Montserrat", Arial, sans-serif); }
.astra-photo-calendar-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.astra-photo-calendar-calc .astra-photo-calendar-choices label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    box-sizing: border-box;
    padding: 8px 12px;
    margin: 0;
    border: 1px solid #a6b6ce;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
}
.astra-photo-calendar-choices label:has(:checked) { color: var(--photo-blue); background: #eaf1ff; border-color: var(--photo-blue); box-shadow: inset 0 0 0 1px var(--photo-blue); }
.astra-photo-calendar-choices label:has(:focus-visible) { outline: 2px solid var(--photo-blue); outline-offset: 3px; }
.astra-photo-calendar-calc .astra-photo-calendar-choices input[type="radio"] { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); }
.astra-photo-calendar-quote { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding: 14px; background: #eff4fd; border-radius: 6px; }
.astra-photo-calendar-quantity label { display: grid; gap: 4px; font-weight: 600; }
.astra-photo-calendar-calc .astra-photo-calendar-quantity input { max-width: 7em; min-height: 38px; box-sizing: border-box; }
.astra-photo-calendar-calc .astra-photo-calendar-quantity p { margin: 4px 0 0; font-size: 12px; }
.astra-photo-calendar-total { display: grid; align-content: start; text-align: right; }
.astra-photo-calendar-total strong { color: var(--photo-blue); font-size: clamp(23px, 3vw, 33px); line-height: 1.24; }
.astra-photo-calendar-total span:last-child { font-size: 12px; }
.astra-photo-calendar-summary { margin: 14px 0 0; }
.astra-photo-calendar-summary > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #dde4ec; padding: 7px 0; }
.astra-photo-calendar-summary dd { margin: 0; text-align: right; }
.astra-photo-calendar-summary > div[hidden], .astra-photo-calendar-table tr[hidden], .astra-photo-calendar-model[hidden] { display: none; }
.astra-photo-calendar-calc [data-photo-calc-message] { margin: 8px 0 0; }
.astra-photo-calendar-controls .astra-photo-calendar-order {
    display: block;
    width: 100%;
    max-width: 280px;
    min-height: 42px;
    margin-top: 10px;
    background: var(--photo-blue);
}
.astra-photo-calendar-controls [data-photo-order-feedback] { margin: 6px 0 0; }
[data-photo-calc-message]:empty, [data-photo-order-feedback]:empty { display: none; }
.astra-photo-calendar-product .astra-notebook-order-art span::after {
    inset: -4px 2px auto;
    height: 7px;
    background: repeating-linear-gradient(90deg, #244baf 0 2px, transparent 2px 5px);
}

.astra-photo-calendar-scene {
    container-type: inline-size;
    overflow: hidden;
    background: #f4f5f3;
}
.astra-photo-calendar-stage {
    min-height: clamp(310px, 95cqw, 515px);
    height: 100%;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    padding: 38px 0 45px;
    background:
        radial-gradient(ellipse at 35% 25%, #fff 0%, transparent 68%),
        linear-gradient(180deg, #e8ede9 0 84%, #e1e6e0 84% 85%, #f4f5f3 85%);
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-stage {
    background:
        radial-gradient(ellipse at 34% 25%, #fbfaf8 0%, transparent 76%),
        linear-gradient(180deg, #e7e9e9 0 63%, #d6dcdd 63% 63.5%, #eaeeed 63.5%);
}
.astra-photo-calendar-model {
    --photo-depth: 0;
    --photo-height-limit: clamp(200px, 75cqw, 385px);
    --photo-scale: min(calc((100cqw - 72px) / (var(--photo-max-width) * (1 + var(--photo-depth)))),
        calc(var(--photo-height-limit) / var(--photo-max-height)));
    --photo-face-width: calc(var(--photo-scale) * var(--photo-width));
    --photo-side-width: calc(var(--photo-face-width) * var(--photo-depth));
    position: relative;
    margin-right: var(--photo-side-width);
    width: var(--photo-face-width);
    height: calc(var(--photo-scale) * var(--photo-height));
    container-type: inline-size;
    color: #365045;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-model {
    --photo-depth: .26;
    --photo-height-limit: clamp(178px, 67cqw, 355px);
    /* Reserve room for the diagonal top edge, lean and foot of the angled model. */
    --photo-scale: min(calc((100cqw - 72px) / (var(--photo-max-width) * (1 + var(--photo-depth)) + var(--photo-max-height) * .123)),
        calc(var(--photo-height-limit) / (var(--photo-max-height) + var(--photo-max-width) * .268)));
    margin-right: 0;
    margin-left: var(--photo-side-width);
    transform: skewY(-15deg) skewX(7deg);
    color: #745331;
}
.astra-photo-calendar-stand { display: none; }
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-stand {
    display: block;
    position: absolute;
    z-index: 0;
    inset: 0 auto 0 calc(-100% * var(--photo-depth));
    width: calc(100% * var(--photo-depth) + 1px);
    background: linear-gradient(105deg, #d2d7d5, #78837f 75%, #626d68);
    clip-path: polygon(100% 0, 100% 100%, 0 80%);
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-stand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(112deg, #a7b0ab, #e5e9e4 78%);
    clip-path: polygon(0 80%, 100% 89%, 100% 100%);
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-model::before {
    content: "";
    position: absolute;
    inset: auto -14px -11px calc(-100% * var(--photo-depth));
    height: 24px;
    background: #424e4b67;
    border-radius: 50%;
    filter: blur(12px);
}
.astra-photo-calendar-sheet {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    grid-template-rows: minmax(0, 1.95fr) minmax(0, 1fr);
    overflow: hidden;
    background: #fffefc;
    box-shadow: 1px 2px 0 #d4dbd4, 2px 4px 0 #b9c2b9, 7px 9px 18px #3a4a4149;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-sheet {
    border-bottom: clamp(6px, 6cqw, 21px) solid #dce2dd;
    box-shadow: -2px 1px 0 #afb9b1, 1px 3px 0 #969c94, 3px 5px 9px #292f2940;
}
.astra-photo-calendar-scene[data-orientation="landscape"] .astra-photo-calendar-sheet {
    grid-template: minmax(0, 1fr) / minmax(0, 1.24fr) minmax(0, 1fr);
}
.astra-photo-calendar-picture { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.astra-photo-calendar-calc .astra-photo-calendar-picture img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 57% center;
    border-radius: 0;
    box-shadow: none;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-picture {
    container-type: size;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-picture img {
    position: static;
    width: min(83cqw, 83cqh);
    height: min(83cqw, 83cqh);
    border-radius: 50%;
}
.astra-photo-calendar-month {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .35em;
    min-height: 0;
    min-width: 0;
    padding: 4% 7%;
    box-sizing: border-box;
    background: #f9faf4;
    font: 400 clamp(5px, 3.2cqw, 11px)/1.12 Arial, sans-serif;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-month { background: transparent; }
.astra-photo-calendar-scene[data-orientation="landscape"] .astra-photo-calendar-month { font-size: clamp(5px, 2.4cqw, 11px); }
.astra-photo-calendar-month-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .3em;
    padding-bottom: .22em;
    border-bottom: 1px solid #b9cabc;
    color: #41654e;
    font-size: 1.22em;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-month-title { color: #9b5e25; border-color: #e4c8a6; }
.astra-photo-calendar-dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; row-gap: .18em; }
.astra-photo-calendar-dates :is(:nth-child(7n - 1), :nth-child(7n)) { color: #a65029; }
.astra-photo-calendar-coil {
    position: absolute;
    z-index: 2;
    inset: -4px 2px auto;
    height: 8px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, transparent 0 2px, #354341 2px 3px, #e0e6e1 3px 4px, #5a6662 4px 5px, transparent 5px 8px);
    filter: drop-shadow(0 1px 1px #342f2877);
}
.astra-photo-calendar-loop {
    position: absolute;
    z-index: 3;
    inset: -12px auto auto 50%;
    width: 17px;
    height: 14px;
    transform: translateX(-50%);
    border: 2px solid #58645e;
    border-bottom: 0;
    border-radius: 100% 100% 0 0;
    background: #f0f3ee;
    box-shadow: inset 0 1px 1px #fff, 0 -1px 0 #c6ccc9;
    box-sizing: border-box;
}
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-loop { display: none; }
.astra-photo-calendar-arrow { position: absolute; color: #415c62; font: 650 11px/1.1 Arial, sans-serif; white-space: nowrap; z-index: 4; }
.astra-photo-calendar-arrow::before, .astra-photo-calendar-arrow::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border: solid currentColor;
    border-width: 1px 1px 0 0;
    box-sizing: border-box;
}
.astra-photo-calendar-width { inset: auto 0 -21px; border-top: 1px solid currentColor; }
.astra-photo-calendar-width::before { left: 1px; top: -3px; rotate: -135deg; }
.astra-photo-calendar-width::after { right: 1px; top: -3px; rotate: 45deg; }
.astra-photo-calendar-width > span { position: absolute; left: 50%; top: 5px; translate: -50% 0; }
.astra-photo-calendar-height { inset: 0 auto 0 -15px; border-left: 1px solid currentColor; }
.astra-photo-calendar-height::before { top: 1px; left: -3px; rotate: -45deg; }
.astra-photo-calendar-height::after { bottom: 1px; left: -3px; rotate: 135deg; }
.astra-photo-calendar-height > span { position: absolute; top: 50%; right: 5px; translate: 0 -50%; writing-mode: vertical-rl; rotate: 180deg; }
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-height { inset: 0 -15px 0 auto; }
.astra-photo-calendar-scene[data-type="desk"] .astra-photo-calendar-height > span { left: 5px; right: auto; }

@media (max-width: 820px) {
    .astra-photo-calendar-calc { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .astra-photo-calendar-stage { min-height: clamp(285px, 86cqw, 459px); }
}
