/* Stage 47 candidate. Add after public-shell; preserve the approved design.
   Form selectors are explicit so pricing tables and facility cards stay separate. */
.san-public{--san-anchor-offset:126px}
.san-public #content [id]{scroll-margin-top:var(--san-anchor-offset)}
.san-public #layout td#content{padding-top:30px!important}
.san-public #content .san-card-v2 .breadcrumb{line-height:1.65}
.san-public #content .san-card-v2 .section-nav a{min-height:48px;display:inline-flex;align-items:center}
.san-public #content .san-card-v2 .section-nav a:focus-visible{background:var(--san-cream)}
.san-public #content .san-card-v2 .section[id]{scroll-margin-top:var(--san-anchor-offset)}
.san-public #content .san-card-v2 .consultant-request{scroll-margin-top:var(--san-anchor-offset)}

/* Contact: one consistent field width; the legacy inline max-width was 420px. */
.san-public.san-route-kontakt #content .san-contact-form{padding:26px;border:1px solid var(--san-line);border-radius:10px;background:#fffdf7}
.san-public.san-route-kontakt #content .san-contact-form input:not([type=hidden]),
.san-public.san-route-kontakt #content .san-contact-form textarea{max-width:100%!important;width:100%!important}
.san-public.san-route-kontakt #content .san-contact-form label{display:inline-block;margin-bottom:6px}
.san-public.san-route-kontakt #content .san-contact-form textarea{resize:vertical;min-height:180px}
.san-public.san-route-kontakt #content .san-contact-form button[type=submit]{min-width:180px}

/* Long documents: short enough lines and clear section boundaries. */
.san-public.san-route-regulamin #layout{max-width:820px}
.san-public.san-route-regulamin #content>p{max-width:76ch}
.san-public.san-route-regulamin #content>h2{padding-top:22px;margin-top:36px;border-top:1px solid var(--san-line);font-size:27px;letter-spacing:-.3px}
.san-public.san-route-regulamin #content>h1+h2{margin-top:0;padding-top:0;border-top:0}

/* Separate booking form shell from the 570px catalogue-card selector. */
.san-public:is(.san-route-sanatoria-rezerwacje,.san-route-rezerwacja_cennik) #layout{max-width:1000px}
.san-public #content table#form{border:1px solid var(--san-line)!important;border-radius:10px;background:#fff;overflow:visible;table-layout:fixed;margin:22px 0 32px!important}
.san-public #content table#form>tbody>tr>td,
.san-public #content table#form>tr>td{width:100%!important;background:#fff!important;padding:24px!important;border:0!important}
.san-public #content table#form>tbody>tr>td.green_belka,
.san-public #content table#form>tr>td.green_belka{background:var(--san-cream)!important;border-bottom:1px solid var(--san-line)!important;padding:17px 24px!important;font-size:17px}
.san-public #content table#form form{margin:0}
.san-public #content table#form form>br{display:none}
.san-public #content table#form form table{width:100%;table-layout:fixed;border-spacing:0;border-collapse:separate;margin:0 0 18px}
.san-public #content table#form form td{padding:10px 8px!important;vertical-align:top;font-family:'Segoe UI',Arial,sans-serif;font-size:15px;line-height:1.6}
.san-public #content table#form form td:first-child{width:200px;color:var(--san-muted)}
.san-public #content table#form form td:last-child{width:auto}
.san-public #content table#form input:where(:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button])),
.san-public #content table#form textarea,
.san-public #content table#form select{width:100%!important;max-width:560px;float:none!important;border:1px solid #b5aa92!important;box-shadow:none}
.san-public #content table#form textarea{min-height:125px;height:auto!important;resize:vertical}
.san-public #content table#form input[name=kod]{width:7em!important;margin-right:8px}
.san-public #content table#form input[name=miasto]{width:calc(100% - 7em - 12px)!important;max-width:calc(560px - 7em - 12px)}
.san-public #content table#form input[name=kontakt_godz]{max-width:180px}
.san-public #content table#form input[name=ile_osob],
.san-public #content table#form select[name=ile_pokoi]{max-width:130px}
.san-public #content table#form select[name=telefon_kom_kierunek]{display:block;margin-bottom:8px;max-width:560px}
.san-public #content table#form input[name=telefon_kom]~br{display:none}
.san-public #content table#form input[name=telefon_kom]~span{display:block;max-width:560px;margin-top:8px;color:var(--san-muted)!important;font:400 13px/1.6 'Segoe UI',Arial,sans-serif;font-weight:400!important}
.san-public #content table#form td:has(>input:not([type=checkbox]))>.red{display:block;margin-top:4px;font:400 13px/1.5 'Segoe UI',Arial,sans-serif}
.san-public #content table#form select[id$='_rrrr']{width:80px!important;max-width:80px;margin-bottom:6px}
.san-public #content table#form select[id$='_mm']{width:calc(100% - 150px)!important;min-width:124px;max-width:200px;margin-bottom:6px}
.san-public #content table#form select[id$='_dd']{width:58px!important;max-width:58px;margin-bottom:6px}
.san-public #content table#form input[type=button],
.san-public #content table#form input[type=submit]{float:none!important;max-width:100%;white-space:normal;margin:6px 8px 6px 0;min-width:130px}
.san-public #content table#form input[name=poprzednie]{background:white!important;border-color:#b5aa92!important;color:var(--san-brown)!important}
.san-public #content .san-form-section-title{font:600 22px/1.4 'Segoe UI',Arial,sans-serif;letter-spacing:0;margin:30px 0 10px;padding-top:22px;border-top:1px solid var(--san-line)}
.san-public #content .san-form-section-title:first-child{margin-top:0;padding-top:0;border-top:0}
.san-public #content .san-form-help{padding:14px 18px;border-left:3px solid #aa7b19;background:#fffaf0;color:var(--san-muted);font-family:'Segoe UI',Arial,sans-serif;font-size:15px;line-height:1.65;margin:0 0 20px}
.san-public #content .san-form-help strong{color:var(--san-ink)}
.san-public #content table#form .san-form-consent>td:first-child{text-align:right!important;padding-top:11px!important}
.san-public #content table#form .san-form-consent>td:last-child{font-size:14px;color:var(--san-muted)}
.san-public #content table#form .san-form-consent input{margin:0;cursor:pointer}
.san-public #content table#form .san-form-field-hint{font-size:13px;line-height:1.5}
.san-public #content table#form .san-choice-summary{max-width:560px;margin:6px 0 0;color:var(--san-muted);font:400 14px/1.6 'Segoe UI',Arial,sans-serif;overflow-wrap:anywhere}
.san-public #content table#form .san-choice-summary[hidden]{display:none}
.san-public #content #rezerwacja_cennik_table{background:#fffdf7;border-radius:7px}
.san-public #content #rezerwacja_cennik_table td:first-child{width:175px}
.san-public #content #rezerwacja_cennik_table td:has(>img){width:155px}
.san-public #content #rezerwacja_cennik_table img{border-radius:6px;object-fit:cover}

@media(max-width:820px){
 .san-public #layout td#content{padding-top:24px!important}
 .san-public #content table#form form td{padding:5px 0!important}
 .san-public #content table#form form td:first-child{font-size:14px;font-weight:600;color:var(--san-ink);padding-top:15px!important}
 .san-public #content table#form form td:last-child{padding-bottom:11px!important}
 .san-public #content table#form .san-form-consent{display:grid!important;grid-template-columns:28px minmax(0,1fr);gap:8px;margin:12px 0}
 .san-public #content table#form .san-form-consent>td:first-child,
 .san-public #content table#form .san-form-consent>td:last-child{width:auto!important;min-width:0;padding:4px 0!important;font-weight:400}
 .san-public #content table#form .san-form-consent>td:first-child{text-align:left!important}
 .san-public #content #rezerwacja_cennik_table td{padding:7px 12px!important}
 .san-public #content #rezerwacja_cennik_table td:has(>img){width:100%!important}
 .san-public #content #rezerwacja_cennik_table img{float:none;width:180px;max-width:100%}
}
@media(max-width:760px){
 .san-public{--san-anchor-offset:104px}
 .san-public #content table#form>tbody>tr>td,
 .san-public #content table#form>tr>td{padding:16px!important}
 .san-public #content table#form>tbody>tr>td.green_belka,
 .san-public #content table#form>tr>td.green_belka{padding:16px!important;line-height:1.5}
 .san-public #content .san-form-section-title{font-size:20px;margin-top:22px;padding-top:18px}
 .san-public.san-route-kontakt #content .san-contact-form{padding:20px}
 .san-public.san-route-kontakt #content .san-contact-form button[type=submit]{width:100%}
 .san-public #content table#form input[type=submit],
 .san-public #content table#form #nastepneokno{width:100%!important;margin-right:0}
 .san-public.san-route-regulamin #content>h2{font-size:25px}
}
@media(max-width:360px){
 .san-public #content table#form>tbody>tr>td{padding:12px!important}
 .san-public #content table#form select[id$='_rrrr'],
 .san-public #content table#form select[id$='_mm'],
 .san-public #content table#form select[id$='_dd']{padding-inline:4px}
 .san-public.san-route-kontakt #content .san-contact-form{padding:16px}
}
@media print{.san-public #layout td#content{padding-top:0!important}}
