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

.astra-wall-preview,
.astra-wall-preview h1,
.astra-wall-preview .widefat,
.astra-wall-calculator {
    font-family: var(--astra-ui-font, Montserrat, Arial, sans-serif);
}

.astra-wall-calculator {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    max-width: var(--astra-ui-width, 1400px);
    margin-inline: auto;
    color: var(--astra-ui-ink, #253457);
    font-size: 14px;
}

.astra-wall-preview .astra-wall-calculator { max-width: 1160px; margin-inline: 0; }

.astra-wall-scene {
    container-type: inline-size;
    margin: 0;
    overflow: hidden;
    border: 1px solid #c8c6bd;
    border-radius: 10px;
    background: #e4e1d9;
}

.astra-wall-surface {
    display: grid;
    place-items: center;
    min-height: clamp(310px, 89cqw, 490px);
    padding: 24px 0 36px;
    background:
        radial-gradient(ellipse at 14% 4%, #fff9e999, transparent 66%),
        linear-gradient(112deg, transparent 44%, #716b5c14 76%, #716b5c28 100%),
        repeating-radial-gradient(ellipse at 21% 36%, #433c2210 0 .5px, transparent 1px 3px),
        #e6e2d8;
}

.astra-wall-calendar {
    --wall-width: 210;
    --wall-height: 297;
    --wall-scale: min(.76px, .167cqw);
    --wall-dimension-ink: #48473f;
    position: relative;
    width: calc(var(--wall-width) * var(--wall-scale));
    height: calc(var(--wall-height) * var(--wall-scale));
    container-type: inline-size;
}

.astra-wall-calendar::before {
    content: "";
    position: absolute;
    inset: 12px 0 0;
    background: #eeeae0;
    box-shadow: 3px 4px 0 #a8a495, 10px 15px 23px #3a322d40;
}

.astra-wall-page {
    --wall-notch: clamp(7px, 5.25cqw, 17px);
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 48% 1fr;
    background: #fffcf6;
    mask-image: radial-gradient(circle at 50% 0, transparent var(--wall-notch), #000 calc(var(--wall-notch) + .5px));
}

.astra-wall-calendar[data-orientation="landscape"] .astra-wall-page {
    grid-template-columns: 51% 1fr;
    grid-template-rows: 1fr;
}

.astra-wall-page img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.astra-wall-month {
    align-self: center;
    padding: 5% 8%;
    color: #282d34;
}

.astra-wall-month-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
    padding-bottom: .25em;
    border-bottom: 1px solid #c2ac8e;
    font-size: clamp(8px, 6.5cqw, 20px);
    line-height: 1.2;
}

.astra-wall-month-title > span { color: #82725d; font-size: .7em; }

.astra-wall-dates {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .16em;
    margin-top: .45em;
    text-align: center;
    font-size: clamp(5px, 4.2cqw, 12px);
    line-height: 1.15;
}

.astra-wall-dates :is(:nth-child(7n), :nth-child(7n - 1)) { color: #ad3d32; }
.astra-wall-calendar[data-orientation="landscape"] .astra-wall-dates { font-size: clamp(4px, 3.15cqw, 10px); }

.astra-wall-binding {
    position: absolute;
    inset: -4px 4px auto;
    display: flex;
    gap: clamp(16px, 11cqw, 36px);
    height: 8px;
}

.astra-wall-binding span {
    flex: 1;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, #292d33 0 1px, #b8bdc4 1px 2px, #444a51 2px 3px, transparent 3px 6px);
    box-shadow: 0 2px 3px #2223;
}

.astra-wall-hanger {
    position: absolute;
    top: -20px;
    left: 50%;
    width: 76%;
    height: 26px;
    translate: -50% 0;
}

.astra-wall-dimension {
    position: absolute;
    color: var(--wall-dimension-ink);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.astra-wall-dimension::before, .astra-wall-dimension::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border: solid currentColor;
    border-width: 1px 1px 0 0;
}

.astra-wall-dimension-width { inset: auto 0 -24px; border-top: 1px solid currentColor; }
.astra-wall-dimension-width::before { left: 0; top: -4px; rotate: -135deg; }
.astra-wall-dimension-width::after { right: 0; top: -4px; rotate: 45deg; }
.astra-wall-dimension-width > span { position: absolute; top: 3px; left: 50%; translate: -50% 0; }
.astra-wall-dimension-height { inset: 0 auto 0 -22px; border-left: 1px solid currentColor; }
.astra-wall-dimension-height::before { top: 0; left: -4px; rotate: -45deg; }
.astra-wall-dimension-height::after { bottom: 0; left: -4px; rotate: 135deg; }
.astra-wall-dimension-height > span {
    position: absolute;
    top: 50%;
    right: 3px;
    translate: 0 -50%;
    writing-mode: vertical-rl;
    rotate: 180deg;
}

.astra-wall-controls.astra-notebook-layout {
    --notebook-blue: var(--astra-ui-accent, #154b9d);
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
    gap: 14px;
}

.astra-wall-controls .astra-wall-parameters-title,
.astra-wall-details h2 {
    color: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 14px;
}

.astra-wall-controls .astra-notebook-icon-control > span {
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
}

.astra-wall-controls .astra-notebook-choice-face { font-size: 14px; }
.astra-wall-controls .astra-notebook-sheet[data-icon="format-a3"] { width: 21px; height: 27px; }
.astra-wall-total-row { display: grid; grid-template-columns: minmax(75px, 1fr) minmax(0, 2fr); gap: 14px; }
.astra-wall-total-row h2 { margin: 0 0 5px; font-size: 16px; }
.astra-wall-total-row [data-wall-unit] { color: #465b75; }
.astra-wall-total .astra-wall-order { min-height: 42px; margin-top: 12px; background: var(--notebook-blue); }
.astra-wall-order-feedback:empty { display: none; }
.astra-wall-error { color: #842b21; margin-bottom: 0; }
.astra-wall-details { grid-column: 1 / -1; }
.astra-wall-details th, .astra-wall-details td { overflow-wrap: anywhere; }

.astra-wall-calculator .astra-notebook-order-art[data-variant="landscape"] span { width: 59px; height: 43px; }
.astra-wall-calculator .astra-notebook-order-art span::after {
    inset: -6px 2px auto;
    height: 7px;
    background: repeating-linear-gradient(90deg, #244baf 0 2px, transparent 2px 5px);
}

@media (max-width: 820px) {
    .astra-wall-calculator { grid-template-columns: minmax(0, 1fr); }
}
