/*
 * WordPress glue: core content classes, block styles, and fixes for markup that changed during the port.
 * main.css stays a near-verbatim copy of the legacy stylesheet so diffs against prod stay readable.
 */

/* -- Root size --
   Prod ran a customized Bootstrap with html{font-size:16px}; stock 3.4.1 ships 10px, which shrinks every rem in
   main.css. 100% matches prod by default and still honors a visitor's browser font-size setting. */
html { font-size: 100%; }

/* -- Heading utility classes --
   Templates use semantic h1/h2 with .h2/.h3 for the legacy visual size. Bootstrap's .hN uses px; match main.css. */
.h1, .h2, .h3, .h4, .h5, .h6 { font-family: "Crimson Text", serif; }
.h1 { font-size: 2.8rem; }
.h2 { font-size: 2.4rem; }
.h3 { font-size: 2rem; }
.h4 { font-size: 1.6rem; }
.h5 { font-size: 1.3rem; }
.h6 { font-size: 1.1rem; }

/* -- Accessibility -- */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link:focus {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 100000;
    padding: .75rem 1rem;
    background: #fff;
    color: #1b1e23;
    border-radius: .25rem;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
    outline: .1875rem solid #337ab7;
    outline-offset: .125rem;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
/* Fixed header covers anchor targets (#Staff etc.); replaces the legacy per-breakpoint JS scroll offsets. */
[id] { scroll-margin-top: 10rem; }

/* -- Header -- */
/* Was an <h3> on prod (line-height 1.1); as a <p> it would pick up main.css's 1.6 and grow the header. */
.contact--phone { line-height: 1.1; }
.contact--phone a,
.contact--phone a:hover,
.contact--phone a:focus { color: inherit; }

/* Close "X" is a real <button> now; strip default button chrome so it looks like the legacy div. */
.modal-close {
    background: none;
    border: 0;
    padding: 0;
    font-size: 1.25rem;
}

/* -- Consultation modal disclaimer (was a JS slideToggle, now native <details>) -- */
.contact-form--disclaimer-details { margin: 1rem 0 0; }
.contact-form--disclaimer-details > summary {
    display: inline-block;
    cursor: pointer;
    color: #337ab7;
}
.contact-form--disclaimer-details > p {
    margin-top: .75rem;
    padding: 1rem;
    color: #000;
    background: #ddd;
    border-radius: .375rem;
    text-align: left;
}

/* -- Consultation form (Forminator) --
   kcel-core seeds the form with Forminator's design set to "none", so it ships no grid or field CSS and this block is
   the whole skin: the legacy .contact-form .form-control look on Forminator's markup. Scoped to the modal so other
   Forminator forms keep whatever design they're given. */
#appointmentForm .forminator-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -.9375rem;
}
#appointmentForm .forminator-col {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 0 .9375rem;
    margin-bottom: .9375rem;
}
@media (min-width: 992px) {
    #appointmentForm .forminator-col-4 {
        flex-basis: 33.3333%;
        max-width: 33.3333%;
    }
}
/* Placeholders carry the visible label like the legacy form; the real <label>s stay for screen readers. */
#appointmentForm .forminator-field > .forminator-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
#appointmentForm .forminator-input,
#appointmentForm .forminator-textarea {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: .875rem;
    line-height: 1.42857;
    color: #5f6571;
    background: #fff;
    border: 1px solid #5f6571;
    border-radius: .25rem;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
#appointmentForm .forminator-input { height: 2.125rem; }
#appointmentForm .forminator-textarea {
    min-height: 6.5rem;
    resize: vertical;
}
#appointmentForm .forminator-input::placeholder,
#appointmentForm .forminator-textarea::placeholder {
    color: #5f6571;
    opacity: 1;
}
#appointmentForm .forminator-input:focus,
#appointmentForm .forminator-textarea:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 .5rem rgba(102, 175, 233, .6);
}
#appointmentForm .forminator-description {
    display: block;
    margin-top: .25rem;
    font-size: .75rem;
    color: #5f6571;
    text-align: right;
}
/* Consent row: centered and small like the legacy .disclaimer-check, with a native checkbox instead of
   Forminator's custom box (which has no styling under design "none"). */
#appointmentForm .forminator-field-consent .forminator-checkbox__wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #5f6571;
}
#appointmentForm .forminator-consent { margin: 0; }
#appointmentForm .forminator-consent input[type="checkbox"] {
    position: static;
    width: 1rem;
    height: 1rem;
    margin: 0;
    opacity: 1;
}
#appointmentForm .forminator-checkbox-box { display: none; }
/* "disclaimer" in the consent line is a <button> (it toggles, it doesn't navigate); dressed as main.css's legacy link. */
#appointmentForm .contact-form--disclaimer-link {
    padding: 0;
    font: inherit;
    color: #5f6571;
    text-decoration: underline;
    background: none;
    border: 0;
}
/* main.css hides .contact-form--disclaimer outright (it was a jQuery slideToggle); [hidden] drives it now. */
#appointmentForm .contact-form--disclaimer {
    display: block;
    margin: 0 0 .9375rem;
    font-size: .875rem;
}
#appointmentForm .contact-form--disclaimer[hidden] { display: none; }
#appointmentForm .contact-form--disclaimer > p { margin: 0; }
/* Submit row doubles as the modal footer (Close is injected beside Submit): Bootstrap's .modal-footer look, bled
   to the modal edges. The row's negative margin cancels the column padding, so this lines up with the body edge. */
#appointmentForm .forminator-row-last {
    margin-top: .5rem;
    margin-bottom: -.9375rem;
    padding: .9375rem 0;
    border-top: 1px solid #e5e5e5;
}
#appointmentForm .forminator-row-last .forminator-col {
    display: flex;
    justify-content: flex-end;
    gap: .3125rem;
    margin-bottom: 0;
}
/* Inline validation: Forminator flags the field wrapper and appends a message span. #a94442 is Bootstrap's error red (7.1:1 on white). */
#appointmentForm .forminator-has_error .forminator-input,
#appointmentForm .forminator-has_error .forminator-textarea { border-color: #a94442; }
#appointmentForm .forminator-error-message {
    display: block;
    margin-top: .25rem;
    font-size: .8rem;
    color: #a94442;
}
#appointmentForm .forminator-field-consent .forminator-error-message { text-align: center; }
#appointmentForm .forminator-response-message:not(:empty) {
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}
#appointmentForm .forminator-response-message.forminator-error {
    color: #a94442;
    background: #f2dede;
    border-color: #ebccd1;
}
#appointmentForm .forminator-response-message.forminator-success {
    color: #3c763d;
    background: #dff0d8;
    border-color: #d6e9c6;
}
#appointmentForm .forminator-response-message[aria-hidden="true"] { display: none; }
#appointmentForm .forminator-hidden { display: none; }

@media only screen and (max-width: 600px) {
    /* main.css drops the modal body padding to .5rem here; match it so the footer border still meets the edges. */
    #appointmentForm .forminator-row { margin: 0 -.5rem; }
    #appointmentForm .forminator-col { margin-bottom: .5rem; padding: 0 .5rem; }
    #appointmentForm .forminator-row-last { margin-bottom: -.5rem; padding: .5rem 0; }
}

/* -- Offices -- */
.location--note {
    display: block;
    font-size: .875rem;
    font-weight: 400;
}
/* Name sits outside <address> now (an office name isn't address data), so it no longer inherits .office--address's white. */
.office .location--name { margin: 0 0 .5rem; color: #fff; }
/* Prod's phone numbers were plain text; as tel: links, Bootstrap blue on slate is ~1.6:1. White + underline is ~5.9:1. */
.office--phone a,
.office--phone a:hover,
.office--phone a:focus {
    color: #fff;
    text-decoration: underline;
}

/* -- Staff modal -- */
#staffPic[hidden] { display: none; }

/* -- Homepage practice-area accordions (core Details block replaces the legacy Bootstrap collapse markup) -- */
.marketing__text .wp-block-details {
    margin: 0 0 .5rem;
    border-bottom: 1px solid #d9d9d9;
}
.marketing__text .wp-block-details > summary {
    padding: .5rem .35rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #5f6571;
    cursor: pointer;
    list-style: none;
    transition: color .25s ease-in-out;
}
.marketing__text .wp-block-details > summary::-webkit-details-marker { display: none; }
.marketing__text .wp-block-details > summary::before {
    content: "\f13a"; /* fa-chevron-circle-down */
    margin-right: .5rem;
    font-family: FontAwesome;
    font-weight: 400;
}
.marketing__text .wp-block-details[open] > summary::before { content: "\f139"; /* fa-chevron-circle-up */ }
.marketing__text .wp-block-details > summary:hover { color: #1b1e23; }
.marketing__text .wp-block-details > :not(summary) { padding: 0 .35rem; }

/* -- Blog listings -- */
.btn--filter.active {
    color: #fff;
    background-color: #5f6571;
    border-color: #5f6571;
}
.kcel-pagination { margin: 2rem 0; }
.kcel-pagination .page-numbers {
    display: inline-block;
    margin: 0 .25rem;
    padding: .375rem .75rem;
    border: 1px solid #d9d9d9;
    border-radius: .25rem;
    background: #fff;
}
.kcel-pagination .page-numbers.current {
    color: #fff;
    background: #5f6571;
    border-color: #5f6571;
}
.entry__nav { margin: 2rem 0 0; }
.entry__tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

/* -- Nursing Home Guide -- */
.row--nhg > h2 { margin: 1rem 0; }
.nhg__filters { margin-bottom: 1rem; }
.nhg__filters[hidden] { display: none; }
.nhg__export .dt-buttons { margin-bottom: 1rem; }
.nhg__export .btn { text-align: left; }
.nhg__filters-heading { margin-top: 1rem; }
/* Groups are <fieldset>/<legend> with a real <button> toggle now; strip Bootstrap's legend and button chrome so
   main.css's legacy .group-options__header bar still applies. */
.list__group-options {
    min-width: 0;
    padding: 0;
}
.group-options__legend {
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: inherit;
    border: 0;
}
.group-options__header {
    display: block;
    text-align: left;
    border-width: 0 0 1px;
}
.group-options__header[aria-expanded="true"] .fa::before { content: "\f146"; /* fa-minus-square */ }
.group-options__header[aria-expanded="false"] .fa::before { content: "\f0fe"; /* fa-plus-square */ }
/* County and City run to dozens of entries; scroll inside the group instead of shoving the table off-screen. */
.group-options__body {
    max-height: 16rem;
    overflow-y: auto;
    padding: .25rem .4rem;
}
.group-options__body > label {
    display: block;
    margin: 0;
    padding: .125rem 0;
    font-weight: 400;
}
/* Phone numbers broke at the hyphen in narrow cells ("913-367-" / "1905"). */
.table--nhg a[href^="tel:"] { white-space: nowrap; }
.entry__meta { margin-top: -.5rem; }

/* -- Core content classes -- */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
/* Legacy posts floated ~675px images inside a 1170px column so text wrapped beside them; a full-width float
   leaves no room to wrap. On phones, floats would squeeze text into a sliver, so they go full width. */
.wp-block-image.alignleft,
.wp-block-image.alignright { max-width: 58%; }
@media (max-width: 600px) {
    .wp-block-image.alignleft,
    .wp-block-image.alignright { float: none; max-width: 100%; margin: 0 0 1rem; }
}
.aligncenter { display: block; margin-right: auto; margin-left: auto; }
.wp-caption,
.wp-block-image figcaption { max-width: 100%; font-size: .875rem; color: #5f6571; }
.entry__content img { max-width: 100%; height: auto; }
.entry__content::after { content: ""; display: table; clear: both; }
.wp-block-embed iframe { max-width: 100%; }
