/**
 * SemaEstate - public site.
 *
 * Layout comes from the template's Bootstrap grid; this file styles only what Bootstrap
 * has no opinion about - the property card, the gallery, the parameter table and the map.
 * Everything is scoped under .com-semaestate so it cannot leak into the rest of the site,
 * and colours come from custom properties so a template can retune them without an
 * override.
 */

.com-semaestate {
    --se-radius: .5rem;
    --se-border: #e3e3e3;
    --se-muted: #6c757d;
    --se-accent: #0b6b3a;
    --se-badge-bg: #f1f3f5;
}

/* Listing ------------------------------------------------------------------ */

.semaestate-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.semaestate-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
    background: #fff;
}

.semaestate-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--se-badge-bg);
}

.semaestate-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.semaestate-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--se-muted);
    font-size: .875rem;
}

.semaestate-card__flags {
    position: absolute;
    top: .5rem;
    left: .5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.semaestate-flag {
    padding: .125rem .5rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: .75rem;
    line-height: 1.5;
}

.semaestate-flag--featured {
    background: var(--se-accent);
}

.semaestate-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .35rem;
    padding: .875rem 1rem 1rem;
}

.semaestate-card__title {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.35;
}

.semaestate-card__title a {
    color: inherit;
    text-decoration: none;
}

.semaestate-card__title a:hover,
.semaestate-card__title a:focus {
    text-decoration: underline;
}

.semaestate-card__ref {
    margin: .125rem 0 0;
    color: var(--se-muted);
    font-size: .75rem;
    letter-spacing: .02em;
}

.semaestate-card__meta {
    color: var(--se-muted);
    font-size: .875rem;
}

.semaestate-card__price {
    margin-top: auto;
    padding-top: .5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Filter ------------------------------------------------------------------- */

.semaestate-filter {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
    background: var(--se-badge-bg);
}

.semaestate-filter__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
    gap: .75rem;
}

.semaestate-filter__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.semaestate-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

.semaestate-toolbar__count {
    color: var(--se-muted);
}

/* Detail ------------------------------------------------------------------- */

.semaestate-detail__header {
    margin-bottom: 1rem;
}

.semaestate-detail__ref {
    color: var(--se-muted);
    font-size: .875rem;
}

.semaestate-detail__price {
    font-size: 1.5rem;
    font-weight: 600;
}

.semaestate-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
    gap: .5rem;
    padding: 0;
    margin: 0 0 1.5rem;
    list-style: none;
}

.semaestate-gallery__item:first-child {
    grid-column: 1 / -1;
}

.semaestate-gallery a {
    display: block;
    overflow: hidden;
    border-radius: var(--se-radius);
    aspect-ratio: 4 / 3;
}

.semaestate-gallery__item:first-child a {
    aspect-ratio: 16 / 9;
}

.semaestate-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.semaestate-lightbox {
    max-width: min(96vw, 1400px);
    max-height: 96vh;
    padding: 0;
    border: 0;
    border-radius: var(--se-radius);
    background: #000;
    color: #fff;
}

.semaestate-lightbox::backdrop {
    background: rgba(0, 0, 0, .8);
}

.semaestate-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    touch-action: pan-y pinch-zoom; /* a horizontal move is a swipe for the script */
    user-select: none;
    -webkit-user-select: none;
}

.semaestate-lightbox--single [data-lightbox-prev],
.semaestate-lightbox--single [data-lightbox-next],
.semaestate-lightbox--single [data-lightbox-counter] {
    display: none;
}

.semaestate-lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem;
}

.semaestate-lightbox__bar button {
    min-width: 2.75rem; /* a finger-sized target on a phone */
    min-height: 2.75rem;
    padding: .25rem .75rem;
    font-size: 1.125rem;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: .25rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.semaestate-params {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.semaestate-params th,
.semaestate-params td {
    padding: .4rem .5rem;
    border-bottom: 1px solid var(--se-border);
    text-align: left;
    vertical-align: top;
}

.semaestate-params th {
    width: 45%;
    font-weight: 500;
    color: var(--se-muted);
}

.semaestate-agent {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
}

.semaestate-agent__photo {
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
}

/* Map ---------------------------------------------------------------------- */

.semaestate-map {
    position: relative;
    height: 26rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
    background: var(--se-badge-bg);
}

.semaestate-map--list {
    height: 34rem;
}

.semaestate-map__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--se-accent);
    font: inherit;
    cursor: pointer;
}

.semaestate-map__logo img {
    display: block;
}

/* Inquiry ------------------------------------------------------------------ */

.semaestate-inquiry {
    padding: 1rem;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
}

.semaestate-inquiry .semaestate-field {
    margin-bottom: .75rem;
}

.semaestate-inquiry label {
    display: block;
    margin-bottom: .25rem;
}

/*
 * The honeypot. Hidden from people in every way a browser offers, and left in the tab
 * order for nobody: a bot filling every input in the form is the whole point.
 */
.semaestate-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Agents ------------------------------------------------------------------- */

.semaestate-agents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.semaestate-agents__card {
    padding: 1rem;
    border: 1px solid var(--se-border);
    border-radius: var(--se-radius);
    text-align: center;
}

.semaestate-agents__card img {
    width: 6rem;
    height: 6rem;
    margin-bottom: .75rem;
    border-radius: 50%;
    object-fit: cover;
}

/* Links and documents ------------------------------------------------------ */

.semaestate-links,
.semaestate-documents,
.semaestate-plans {
    margin-bottom: 1.5rem;
}

/* Floor plans and the energy certificate: a row of tiles, contained (a plan is a drawing,
   not something to crop), the certificate tile portrait. */
.semaestate-plans__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.semaestate-plans__item a:not(.semaestate-plans__download) {
    display: block;
    overflow: hidden;
    border: 1px solid var(--se-border, #e5e7eb);
    border-radius: var(--se-radius);
    background: #fff;
    aspect-ratio: 4 / 3;
}

.semaestate-plans--penb .semaestate-plans__item a:not(.semaestate-plans__download) {
    aspect-ratio: 3 / 4;
}

.semaestate-plans__item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.semaestate-plans__caption,
.semaestate-plans__download {
    display: block;
    margin-top: .4rem;
    font-size: .9rem;
}

.semaestate-links__list,
.semaestate-documents__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.semaestate-links__item {
    display: inline-block;
    padding: .4rem .9rem;
    border: 1px solid var(--se-accent);
    border-radius: var(--se-radius);
    color: var(--se-accent);
    text-decoration: none;
}

.semaestate-links__item:hover,
.semaestate-links__item:focus-visible {
    background: var(--se-accent);
    color: #fff;
}

.semaestate-links__external {
    margin-left: .25rem;
    font-size: .8em;
}

.semaestate-documents__size {
    color: var(--se-muted);
    font-size: .875rem;
}

/* Print ---------------------------------------------------------------------- */

.semaestate-detail__tools {
    margin: .5rem 0 0;
    font-size: .875rem;
}

/* The sales sheet (phase 23, design of 25. 9. 2026): two A4 pages, white paper, accent colour
   from the print settings as --semaestate-print-accent on the root, font Mulish from the
   media. Page two starts with its own header; the running footer is an inline @page rule. */
@font-face {
    font-family: "SemaestateMulish";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/mulish-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "SemaestateMulish";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/mulish-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

body:has(.semaestate-sheet) {
    background: #fff;
}

.semaestate-sheet {
    --sheet-accent: var(--semaestate-print-accent, #357f7c);
    --sheet-ink: color-mix(in srgb, var(--sheet-accent) 30%, #0b1413);
    --sheet-muted: color-mix(in srgb, var(--sheet-accent) 12%, #5e6664);
    --sheet-line: color-mix(in srgb, var(--sheet-accent) 12%, #e2e5e4);
    --sheet-soft: color-mix(in srgb, var(--sheet-accent) 9%, #fff);

    max-width: 210mm;
    margin: 0 auto;
    padding: 8mm 11mm;
    background: #fff;
    color: var(--sheet-ink);
    font-family: "SemaestateMulish", sans-serif;
    font-size: 9.2pt;
    line-height: 13pt;
}

.semaestate-sheet p {
    margin: 0;
}

.semaestate-sheet h1 {
    margin: 0;
    color: inherit;
    font-family: inherit;
    font-size: 26pt;
    line-height: 32pt;
    font-weight: 300;
}

.semaestate-sheet h2 {
    margin: 0 0 2mm;
    color: var(--sheet-accent);
    font-family: inherit;
    font-size: 11pt;
    line-height: 14pt;
    font-weight: 700;
    text-transform: uppercase;
    break-after: avoid;
}

.semaestate-sheet img {
    display: block;
    max-width: 100%;
}

.semaestate-sheet__toolbar {
    margin-bottom: 6mm !important;
    text-align: right;
}

/* Header of both pages: the logo and the kind of the sheet. */
.semaestate-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6mm;
    min-height: 14mm;
    margin-bottom: 6mm;
}

.semaestate-sheet__logo {
    max-height: 14mm;
    max-width: 48mm;
    width: auto;
}

.semaestate-sheet__company {
    color: var(--sheet-accent);
    font-size: 16pt;
    font-weight: 700;
}

.semaestate-sheet__kind {
    color: var(--sheet-muted);
    font-size: 8pt;
    font-weight: 700;
    text-align: right;
    text-transform: uppercase;
}

/* Title, then one strip of key facts with the price box at its end. */
.semaestate-sheet__title {
    margin-bottom: 4mm;
}

.semaestate-sheet__subtitle {
    margin-top: 1mm !important;
    color: var(--sheet-muted);
}

.semaestate-sheet__summary {
    display: flex;
    align-items: stretch;
    min-height: 18.7mm;
    margin-bottom: 4.5mm;
    border-radius: 2mm;
    background: var(--sheet-soft);
}

.semaestate-sheet__facts {
    display: flex;
    flex: 1 1 auto;
    gap: 3mm 5mm;
    align-items: center;
    margin: 0;
    padding: 3mm 4mm;
    list-style: none;
}

.semaestate-sheet__facts li {
    flex: 1 1 auto;
    min-width: 0;
}

.semaestate-sheet__facts strong {
    display: block;
    font-size: 14pt;
    line-height: 17pt;
}

.semaestate-sheet__facts span {
    display: block;
    color: var(--sheet-muted);
    font-size: 7pt;
    line-height: 9pt;
    text-transform: uppercase;
}

.semaestate-sheet__price {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 52mm;
    padding: 3mm 4.5mm;
    border-radius: 2mm;
    background: var(--sheet-accent);
    color: #fff;
}

.semaestate-sheet__price strong {
    font-size: 17pt;
    line-height: 24pt;
    white-space: nowrap;
}

.semaestate-sheet__price span {
    font-size: 8pt;
    line-height: 10pt;
}

/* Photos: the main one with two beside it, then a row of four. */
.semaestate-sheet__gallery {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.8mm;
    height: 81mm;
    margin-bottom: 2.8mm;
}

.semaestate-sheet__gallery img,
.semaestate-sheet__photos img {
    width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: cover;
}

.semaestate-sheet__main {
    grid-row: 1 / 3;
}

.semaestate-sheet__gallery--single {
    grid-template-columns: 1fr;
}

.semaestate-sheet__photos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.8mm;
    margin-bottom: 7mm;
}

.semaestate-sheet__photos img {
    height: 28mm;
}

.semaestate-sheet__gallery + .semaestate-sheet__text {
    margin-top: 7mm;
}

/* Text: headings inside the description look like the section headings. */
.semaestate-sheet__text {
    margin-bottom: 6mm;
}

.semaestate-sheet__text--columns .semaestate-sheet__description {
    column-count: 2;
    column-gap: 8mm;
}

.semaestate-sheet__description > :first-child {
    margin-top: 0;
}

.semaestate-sheet__description p,
.semaestate-sheet__description ul,
.semaestate-sheet__description ol {
    margin: 0 0 2.5mm;
}

.semaestate-sheet__description h2,
.semaestate-sheet__description h3,
.semaestate-sheet__description h4 {
    margin: 5mm 0 2mm;
    color: var(--sheet-accent);
    font-family: inherit;
    font-size: 11pt;
    line-height: 14pt;
    font-weight: 700;
    text-transform: uppercase;
    break-after: avoid;
}

.semaestate-sheet__description > :last-child {
    margin-bottom: 0;
}

/* Page two: parameters as a striped table of two pairs per row. */
.semaestate-sheet__params {
    margin-bottom: 7mm;
}

.semaestate-sheet .semaestate-params {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 8pt;
}

.semaestate-sheet .semaestate-params tbody {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.semaestate-sheet .semaestate-params tr {
    display: flex;
    align-items: center;
    gap: 3mm;
    min-height: 8.1mm;
    padding: 1mm 2.8mm;
    break-inside: avoid;
}

.semaestate-sheet .semaestate-params tr:nth-child(4n + 1),
.semaestate-sheet .semaestate-params tr:nth-child(4n + 2) {
    background: var(--sheet-soft);
}

.semaestate-sheet .semaestate-params tr:nth-child(4n + 1) {
    border-radius: 2mm 0 0 2mm;
}

.semaestate-sheet .semaestate-params tr:nth-child(4n + 2) {
    border-radius: 0 2mm 2mm 0;
}

.semaestate-sheet .semaestate-params th,
.semaestate-sheet .semaestate-params td {
    padding: 0;
    border: 0;
    background: none;
}

.semaestate-sheet .semaestate-params th {
    flex: 0 0 38%;
    color: var(--sheet-muted);
    font-weight: 400;
}

.semaestate-sheet .semaestate-params td {
    font-size: 8.5pt;
    font-weight: 700;
}

.semaestate-sheet .semaestate-params td .text-muted {
    font-weight: 400;
}

.semaestate-sheet__plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60mm, 1fr));
    gap: 4mm;
    margin-bottom: 7mm;
}

.semaestate-sheet__plans figure {
    margin: 0;
    padding: 2mm;
    border: .6pt solid var(--sheet-line);
    border-radius: 2mm;
    break-inside: avoid;
}

.semaestate-sheet__plans img {
    max-height: 70mm;
    width: auto;
    margin: 0 auto;
}

.semaestate-sheet__plans figcaption {
    margin-top: 1mm;
    color: var(--sheet-muted);
    font-size: 8pt;
    text-align: center;
}

/* The agent box: the accent colour, the agent on the left, both QR codes on the right. */
.semaestate-sheet__agent {
    display: flex;
    gap: 5mm;
    align-items: flex-start;
    margin-bottom: 5mm;
    padding: 3.5mm 5mm 3mm;
    border-radius: 2mm;
    background: var(--sheet-accent);
    color: #fff;
    break-inside: avoid;
}

.semaestate-sheet__agent h2 {
    color: #fff;
}

.semaestate-sheet__agent-card {
    flex: 1 1 auto;
    min-width: 0;
}

.semaestate-sheet__agent-row {
    display: flex;
    gap: 4.5mm;
    align-items: flex-start;
}

.semaestate-sheet__agent-photo {
    flex: 0 0 auto;
    width: 16mm;
    height: 22mm;
    object-fit: cover;
}

.semaestate-sheet__agent-name {
    font-size: 14pt;
    line-height: 17pt;
    font-weight: 700;
}

.semaestate-sheet__agent-phone {
    margin-top: 1.5mm !important;
    font-size: 11pt;
    line-height: 15pt;
    font-weight: 700;
}

.semaestate-sheet__agent-meta {
    font-size: 8pt;
    line-height: 11pt;
    opacity: .9;
}

.semaestate-sheet__qr {
    flex: 0 0 auto;
    width: 28mm;
    margin: 0;
    text-align: center;
}

.semaestate-sheet__qr svg {
    display: block;
    width: 28mm;
    height: 28mm;
    padding: 2.5mm;
    border: .7pt solid var(--sheet-line);
    border-radius: 2mm;
    background: #fff;
}

.semaestate-sheet__qr figcaption {
    margin-top: 1.5mm;
    color: #fff;
    font-size: 7.3pt;
    line-height: 9pt;
}

/* Lines for notes. */
.semaestate-sheet__notes {
    margin-bottom: 6mm;
    break-inside: avoid;
}

.semaestate-sheet__line {
    height: 8.8mm;
    border-bottom: .6pt solid var(--sheet-line);
}

.semaestate-sheet__printed {
    color: var(--sheet-muted);
    font-size: 7pt;
}

/* Pages from site-print.js: fixed A4 with the footer at the bottom. */
.semaestate-sheet--paged {
    width: 210mm;
    max-width: none;
    padding: 0;
    background: none;
}

.semaestate-sheet--paged .semaestate-sheet__description {
    column-count: auto;
}

.semaestate-sheet__paper {
    position: relative;
    width: 210mm;
    height: 296mm;
    padding: 8mm 11mm 0;
    overflow: hidden;
    background: #fff;
}

.semaestate-sheet__paper-body {
    display: flow-root;
    max-height: 271mm;
    overflow: hidden;
}

.semaestate-sheet__pagefoot {
    position: absolute;
    right: 11mm;
    bottom: 8mm;
    left: 11mm;
    display: flex;
    justify-content: space-between;
    gap: 6mm;
    padding-top: 2mm;
    border-top: .6pt solid var(--sheet-line);
    color: var(--sheet-muted);
    font-size: 7pt;
    line-height: 9pt;
}

@media screen {
    .semaestate-sheet {
        margin: 1rem auto;
        box-shadow: 0 1px 12px rgba(0, 0, 0, .12);
    }

    body:has(.semaestate-sheet--paged) {
        background: #e8edeb;
    }

    .semaestate-sheet--paged {
        box-shadow: none;
    }

    .semaestate-sheet__paper {
        margin-bottom: 6mm;
        box-shadow: 0 1px 12px rgba(0, 0, 0, .12);
    }

    .semaestate-sheet__page--second {
        margin-top: 10mm;
        padding-top: 8mm;
        border-top: 1px dashed var(--sheet-line);
    }
}

@media screen and (max-width: 40rem) {
    .semaestate-sheet:not(.semaestate-sheet--paged) {
        padding: 1rem;
        font-size: 10pt;
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__summary,
    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__agent {
        flex-direction: column;
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__facts {
        flex-wrap: wrap;
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__price {
        min-width: 0;
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__gallery {
        height: 60vw;
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-params tbody {
        grid-template-columns: 1fr;
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-params tr {
        border-radius: 0 !important;
        background: none !important;
        border-bottom: 1px solid var(--sheet-line);
    }

    .semaestate-sheet:not(.semaestate-sheet--paged) .semaestate-sheet__text--columns .semaestate-sheet__description {
        column-count: 1;
    }
}

@page {
    size: A4;
    margin: 10mm 12mm;
}

@media print {
    .semaestate-sheet__toolbar,
    .semaestate-detail__tools,
    .semaestate-inquiry,
    .semaestate-map,
    .semaestate-detail__similar,
    .semaestate-lightbox {
        display: none !important;
    }

    /* The template pads the component page; on paper that padding alone can push the
       footer to an empty last page. */
    body:has(.semaestate-sheet) {
        margin: 0 !important;
        padding: 0 !important;
    }

    .semaestate-sheet {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .semaestate-sheet,
    .semaestate-sheet * {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .semaestate-sheet__page--second {
        break-before: page;
        page-break-before: always;
    }

    .semaestate-sheet--paged {
        width: auto;
    }

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

    .semaestate-sheet__paper:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .semaestate-sheet__head,
    .semaestate-sheet__summary,
    .semaestate-sheet__gallery,
    .semaestate-sheet__photos img {
        break-inside: avoid;
    }

    .semaestate-links__item {
        border: 0;
        padding: 0;
    }

    .semaestate-links__item::after {
        content: " (" attr(href) ")";
        font-size: .8em;
    }
}

/* The calendar of free times (phase 17, a month grid since phase 19): days with a free
   time are buttons, the rest plain numbers; the times of the picked day below. */
.semaestate-booking {
    max-width: 26rem;
    margin-bottom: 1.5rem;
}

.semaestate-booking__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .25rem;
}

.semaestate-booking__month {
    font-weight: 600;
    text-transform: capitalize;
}

.semaestate-booking__nav {
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1.25rem;
    text-decoration: none;
}

.semaestate-booking__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .25rem;
    text-align: center;
}

.semaestate-booking__weekday {
    font-size: .75rem;
    color: var(--sema-muted, #6c757d);
    text-transform: capitalize;
}

.semaestate-booking__day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-height: 2.5rem;
    border: 1px solid transparent;
    border-radius: .375rem;
    background: none;
    font: inherit;
}

.semaestate-booking__day.is-off {
    color: var(--sema-muted, #adb5bd);
}

.semaestate-booking__day.is-free {
    border-color: var(--sema-accent, #0d6efd);
    color: var(--sema-accent, #0d6efd);
    font-weight: 600;
    cursor: pointer;
}

.semaestate-booking__day.is-free:not(.is-selected):hover,
.semaestate-booking__day.is-free:not(.is-selected):focus-visible {
    background-color: rgba(13, 110, 253, .08);
}

.semaestate-booking__day.is-selected,
.semaestate-booking__slot.is-selected,
.semaestate-booking__slot.is-selected:hover,
.semaestate-booking__slot.is-selected:focus,
.semaestate-booking__slot.is-selected:active {
    /* The states too: templates colour a pressed or focused .btn through their own
       variables (--bs-btn-* in Bootstrap, --btn-* in Cassiopeia). */
    background-color: var(--sema-accent, #0d6efd);
    border-color: var(--sema-accent, #0d6efd);
    color: #fff;
}

.semaestate-booking__times {
    margin-top: .75rem;
}

.semaestate-booking__date {
    margin-bottom: .35rem;
    text-transform: capitalize;
}

.semaestate-booking__slots {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.semaestate-booking__slot {
    min-width: 4.5rem;
    min-height: 2.5rem;
}

.semaestate-booking__note:empty {
    display: none;
}

.semaestate-booking__note {
    margin: .5rem 0 0;
    font-weight: 600;
}

/* Booking page: calendar left, contact form right (a narrow screen keeps one column). */
@media (min-width: 992px) {
    .semaestate-booking-layout {
        display: grid;
        grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
    }
}

.semaestate-booking-choice {
    display: grid;
    gap: .75rem;
    max-width: 26rem;
    margin-bottom: 1rem;
}
