/*
 * Interaction standards shared by the public site, sign-in and administration (blueprint
 * §9.4 Interaction standards). Colours come from the site's own brand token (--brand-red),
 * so the same sheet serves every site of the family.
 */

/* Override browser and utility underlines in every link state. */
a:any-link, a:any-link :is(u, .text-decoration-underline) { text-decoration: none !important; }
:where(a:any-link):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
button[form="jcdc-post"]:is(:hover, :focus), button[form="jcdc-post"]:is(:hover, :focus) *, button:hover, [role="button"]:hover { text-decoration: none; }

/* Every problem at once: the message under each invalid field, and the summary dialog. */
.field-error-note { display: block; margin-top: .3rem; color: #b42318; font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
.field-error-note--group { flex-basis: 100%; }
[data-bs-theme="dark"] .field-error-note, [data-site-theme="dark"] .field-error-note { color: #ff8a80; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: #9f8b87 !important; box-shadow: 0 0 0 .2rem rgb(180 35 24 / 15%); }
.form-problems-dialog { font-size: 16px; line-height: 1.5; width: min(30em, calc(100vw - 2em)); max-height: 88dvh; overflow: auto; overscroll-behavior: contain; padding: 1.4em 1.5em; border: 0; border-top: 4px solid var(--brand-red, #0d7aa8); border-radius: .9em; background: #fff; color: #1f2937; box-shadow: 0 1.5em 3.5em rgb(0 0 0 / 30%); }
.form-problems-dialog::backdrop { background: rgb(10 12 15 / 58%); backdrop-filter: blur(4px); }
.form-problems-dialog h2 { margin: 0 0 .4em; font-size: 1.15em; font-weight: 700; }
.form-problems-dialog p { margin: 0 0 .6em; color: #5f6570; }
.form-problems-dialog ul { margin: 0 0 1.1em; padding-left: 1.2em; }
.form-problems-dialog li { margin-bottom: .3em; overflow-wrap: anywhere; }
.form-problems-dialog__ok { min-width: 6.5em; min-height: 44px; padding: .55em 1.2em; border: 0; border-radius: .55em; background: var(--brand-red, #0d7aa8); color: #fff; font-weight: 650; }
[data-bs-theme="dark"] .form-problems-dialog, [data-site-theme="dark"] .form-problems-dialog { background: var(--dark-panel); color: #e3e6ea; }
[data-bs-theme="dark"] .form-problems-dialog p, [data-site-theme="dark"] .form-problems-dialog p { color: #bec4cc; }

/* The wait card for downloads: appears after 0.6 s, stays until the download starts or "Hide". */
.download-wait[hidden] { display: none; }
.download-wait { font-size: 16px; line-height: 1.5; position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 1em; background: rgb(10 12 15 / 58%); backdrop-filter: blur(4px); }
.download-wait__card { display: flex; flex-wrap: wrap; align-items: center; gap: .9em 1em; width: min(29em, 92vw); padding: 1.2em 1.3em; border: 1px solid #454c55; border-left: 4px solid var(--brand-red, #0d7aa8); border-radius: 1em; background: var(--dark-panel, #1d1e1f); color: #f3f4f6; box-shadow: 0 1em 3em rgb(0 0 0 / 32%); }
.download-wait__spinner { flex: 0 0 auto; width: 1.6em; height: 1.6em; border: 3px solid rgb(255 255 255 / 25%); border-top-color: #fff; border-radius: 50%; animation: download-wait-spin .8s linear infinite; }
.download-wait__text { flex: 1 1 14em; min-width: 0; }
.download-wait__text strong, .download-wait__text small { display: block; }
.download-wait__text small { margin-top: .25em; color: #c9cdd3; font-size: .82em; }
.download-wait__hide { margin-left: auto; min-width: 44px; min-height: 44px; padding: .4em .9em; border: 1px solid #6b7280; border-radius: .5em; background: transparent; color: #f3f4f6; font-size: .85em; }
.download-wait__hide:hover, .download-wait__hide:focus-visible { border-color: #fff; background: rgb(255 255 255 / 10%); }
@keyframes download-wait-spin { to { transform: rotate(360deg); } }


/* Clickable rows: a light brand shade and a 3 px brand bar at the far left; nothing underlined. */
.is-clickable-row ,

/* Clickable rows: a light brand shade and a 3 px brand bar at the far left; nothing underlined. */
.is-clickable-row { cursor: pointer; }
.is-clickable-row > td:first-child, li.is-clickable-row, .is-clickable-row:not(tr) { position: relative; }
.is-clickable-row:hover > td, .is-clickable-row:focus-visible > td, .is-clickable-row:focus-within > td,
li.is-clickable-row:hover, li.is-clickable-row:focus-visible, .is-clickable-row:not(tr):hover, .is-clickable-row:not(tr):focus-visible { background-color: color-mix(in srgb, var(--brand-red, #0d7aa8) 7%, transparent) !important; --bs-table-bg-state: transparent; }
[data-bs-theme="dark"] .is-clickable-row:hover > td, [data-bs-theme="dark"] .is-clickable-row:focus-visible > td, [data-bs-theme="dark"] .is-clickable-row:focus-within > td,
[data-bs-theme="dark"] li.is-clickable-row:hover, [data-bs-theme="dark"] .is-clickable-row:not(tr):hover { background-color: color-mix(in srgb, var(--brand-red, #0d7aa8) 16%, transparent) !important; }
.is-clickable-row:hover > td:first-child::before, .is-clickable-row:focus-visible > td:first-child::before, .is-clickable-row:focus-within > td:first-child::before,
li.is-clickable-row:hover::before, li.is-clickable-row:focus-visible::before, .is-clickable-row:not(tr):hover::before, .is-clickable-row:not(tr):focus-visible::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand-red, #0d7aa8); }
.is-clickable-row:focus-visible { outline: none; }

/* Sortable table headings. */
.table-sort-button { display: inline-flex; align-items: center; gap: .4rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: inherit; text-align: inherit; }
.table-sort-button i { font-size: .75em; opacity: .45; }
th[aria-sort] .table-sort-button i { opacity: 1; color: var(--brand-red, #0d7aa8); }
.table-sort-button:hover span, .table-sort-button:focus-visible span { color: var(--brand-red, #0d7aa8); }

/* Two-step verification: the enrolment QR code is always dark on white; recovery codes in a grid. */
.two-step-state ,

/* Two-step verification: the enrolment QR code is always dark on white; recovery codes in a grid. */
.two-step-state { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.two-step-method { height: 100%; padding: 1rem; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .8rem; }
.two-step-method.is-active { border-color: var(--brand-red, #0d7aa8); box-shadow: inset 3px 0 0 var(--brand-red, #0d7aa8); }
.two-step-qr { width: min(15rem, 100%); margin: .5rem 0 .9rem; padding: .5rem; border-radius: .6rem; background: #fff; }
.two-step-qr svg { display: block; width: 100%; height: auto; }
.two-step-key code, .recovery-code-list code { font-size: .95rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.recovery-codes-once { margin: 1rem 0; padding: 1rem; border: 1px dashed var(--brand-red, #0d7aa8); border-radius: .8rem; background: color-mix(in srgb, var(--brand-red, #0d7aa8) 5%, transparent); }
.recovery-code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: .35rem 1.2rem; margin: 0 0 .9rem; padding-left: 1.6rem; }

/* Phone rules: fields are 16 px below 992 px (iOS would zoom), dialogs fit the screen and scroll inside. */
@media (max-width: 991.98px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea, .form-control, .form-select { font-size: 16px !important; }
}
/* Bootstrap modals scroll as a whole, so their buttons stay reachable; a swipe inside never moves the page behind. */
.modal { overscroll-behavior: contain; }
html:has(dialog[open]:modal) { overflow: hidden; }

/* Stand-alone links and sort headings are never smaller than 24 px (WCAG 2.5.8); touch screens get comfortable 44 px. */
a[href^="mailto:"]:not(.btn):not([class*="whatsapp"]),

/* Stand-alone links and sort headings are never smaller than 24 px (WCAG 2.5.8); touch screens get comfortable 44 px. */
button[form="jcdc-post"][href^="mailto:"]:not(.btn):not([class*="whatsapp"]), a[href^="tel:"]:not(.btn):not([class*="whatsapp"]), button[form="jcdc-post"][href^="tel:"]:not(.btn):not([class*="whatsapp"]), a[href^="https://wa.me/"]:not(.btn):not([class*="whatsapp"]):not([class*="floating"]) , button[form="jcdc-post"][href^="https://wa.me/"]:not(.btn):not([class*="whatsapp"]):not([class*="floating"]) { display: inline-block; padding-block: .35rem; }
.table-sort-button { min-height: 28px; }
.login-card a:not(.btn) ,
.login-card button[form="jcdc-post"]:not(.btn) { display: inline-block; padding-block: .4rem; }
@media (pointer: coarse) {
    .table-sort-button { min-height: 40px; }
    a[href^="mailto:"]:not(.btn):not([class*="whatsapp"]),
    button[form="jcdc-post"][href^="mailto:"]:not(.btn):not([class*="whatsapp"]), a[href^="tel:"]:not(.btn):not([class*="whatsapp"]), button[form="jcdc-post"][href^="tel:"]:not(.btn):not([class*="whatsapp"]), a[href^="https://wa.me/"]:not(.btn):not([class*="whatsapp"]):not([class*="floating"]) , button[form="jcdc-post"][href^="https://wa.me/"]:not(.btn):not([class*="whatsapp"]):not([class*="floating"]) { padding-block: .6rem; }
}
/* Dialog close buttons are 44 x 44 px on touch screens (the icon keeps its size). */
@media (pointer: coarse) {
    .modal .btn-close, .offcanvas .btn-close { box-sizing: border-box; width: 44px; height: 44px; padding: 0; background-size: 1em; background-position: center; background-repeat: no-repeat; }
}

/* More touch targets: the language switch, disclosure headings and (on touch screens) checkboxes. */
summary { min-height: 24px; padding-block: .2rem; }
a[aria-label^="Switch to "],
button[form="jcdc-post"][aria-label^="Switch to "], a[aria-label^="Ganti ke "] , button[form="jcdc-post"][aria-label^="Ganti ke "] { display: inline-block; padding: .45rem .55rem; min-width: 24px; text-align: center; }
@media (pointer: coarse) {
    input[type="checkbox"]:not(.form-switch .form-check-input), input[type="radio"] { width: 1.5rem; height: 1.5rem; }
}

/* Tap-to-use cover over an embedded map on touch screens: swipes over it scroll the page. */
.map-touch-guard { position: absolute; z-index: 2; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 .75rem; border: 0; background: transparent; cursor: pointer; }
.map-touch-guard span { pointer-events: none; padding: .4rem .9rem; border-radius: 999px; background: rgb(0 0 0 / 74%); color: #fff; font-size: .85rem; font-weight: 600; line-height: 1.3; }
.map-touch-guard[hidden] { display: none; }

/* Clean addresses (blueprint §4.1): language switches on sign-in and receipt pages use a small POST form. */
.language-switch-form { display: inline; margin: 0; }
.language-switch-form button { font: inherit; cursor: pointer; }

/*
 * Button shadow (blueprint §9.4): every button-styled control carries the same soft two-layer shadow.
 * Tokens: --btn-shadow (rest), --btn-shadow-hover (hover and keyboard focus, lifts 1 px), --btn-shadow-active
 * (pressed, no lift). Disabled controls are flat. The selectors sit in :where() (specificity 0) so a rule
 * that already gives a control its own shadow (a focus ring, a selected-state ring, a coloured glow) wins and
 * is never replaced. The lift uses the individual `translate` property, which composes with the `transform`
 * some controls use for their position (the slider arrows centre themselves with translateY(-50%)).
 * Not buttons, so not covered: navigation rows (.nav-link), dropdown items, tabs, accordion headers,
 * .btn-link and other link-styled buttons, .btn-close and surface-less icon or sort controls.
 * Transitions always run; the system motion preference is deliberately not read.
 */
:root { --btn-shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 4px 10px rgb(16 24 40 / 8%); --btn-shadow-hover: 0 2px 4px rgb(16 24 40 / 8%), 0 8px 16px rgb(16 24 40 / 12%); --btn-shadow-active: 0 1px 1px rgb(16 24 40 / 8%); }
[data-bs-theme="dark"], [data-theme="dark"], [data-site-theme="dark"], .dark { --btn-shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 4px 10px rgb(0 0 0 / 25%); --btn-shadow-hover: 0 2px 4px rgb(0 0 0 / 40%), 0 8px 16px rgb(0 0 0 / 32%); --btn-shadow-active: 0 1px 1px rgb(0 0 0 / 40%); }
:where(.btn:not(.btn-link, .btn-close, .nav-link, .dropdown-item, [role="tab"], [role="menuitem"]), input:is([type="button"], [type="submit"], [type="reset"]), [role="button"]:not(.nav-link, .dropdown-item, .accordion-button),
    .page-link, .table-pager-nav :is(.page-step, ol a, ol button), .article-pagination ol :is(a, button), .article-category-bar :is(a, button), .post-share-rail :is(a, button),
    .admin-topbar-btn, .guide-btn, .guide-btn-primary, .guide-btn-icon, button.guide-chip, .jcdc-crop__primary, .jcdc-crop__secondary, .jcdc-crop__skip, .jcdc-crop__x, .jcdc-crop__ratios button,
    .pe-tile, .pe-lang, .editor-media-choice, .download-wait__hide, .form-problems-dialog__ok, .image-dialog__step, .dash-btn-ghost, .dash-btn-primary, .profile-page-cta__action, .login-language, .login-theme-toggle,
    .quiz-start-btn, .wa-action-btn, .appointment-submit-btn, .btn-3, .career-carousel-btn, .career-filter-pill, .career-notice-cat-pill, .filter-chip, .gallery-slider-arrow,
    .gallery-filter-btn, .gallery-tab-btn, .hero-arrow, .service-card-btn, .search-submit, .whatsapp-float, .gallery-split-slider :is(.carousel-control-prev, .carousel-control-next)) {
    box-shadow: var(--btn-shadow);
    transition-property: color, background-color, border-color, box-shadow, translate;
    transition-duration: .15s; transition-timing-function: ease;
}
:where(.btn:not(.btn-link, .btn-close, .nav-link, .dropdown-item), input:is([type="button"], [type="submit"], [type="reset"])) { transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease, translate .15s ease; }
input[type="file"]::file-selector-button { box-shadow: var(--btn-shadow); transition: box-shadow .15s ease, translate .15s ease; }
input[type="file"]:hover::file-selector-button { box-shadow: var(--btn-shadow-hover); translate: 0 -1px; }
/* Hover and keyboard focus: deeper shadow and a 1 px lift. A focus ring stays: Bootstrap's ring is layered over the shadow. */
:where(.btn:not(.btn-link, .btn-close, .nav-link, .dropdown-item, [role="tab"], [role="menuitem"]), input:is([type="button"], [type="submit"], [type="reset"]), [role="button"]:not(.nav-link, .dropdown-item, .accordion-button),
    .page-link, .table-pager-nav :is(.page-step, ol a, ol button), .article-pagination ol :is(a, button), .article-category-bar :is(a, button), .post-share-rail :is(a, button),
    .admin-topbar-btn, .guide-btn, .guide-btn-primary, .guide-btn-icon, button.guide-chip, .jcdc-crop__primary, .jcdc-crop__secondary, .jcdc-crop__skip, .jcdc-crop__x, .jcdc-crop__ratios button,
    .pe-tile, .pe-lang, .editor-media-choice, .download-wait__hide, .form-problems-dialog__ok, .image-dialog__step, .dash-btn-ghost, .dash-btn-primary, .profile-page-cta__action, .login-language, .login-theme-toggle,
    .quiz-start-btn, .wa-action-btn, .appointment-submit-btn, .btn-3, .career-carousel-btn, .career-filter-pill, .career-notice-cat-pill, .filter-chip, .gallery-slider-arrow,
    .gallery-filter-btn, .gallery-tab-btn, .hero-arrow, .service-card-btn, .search-submit, .whatsapp-float, .gallery-split-slider :is(.carousel-control-prev, .carousel-control-next)):is(:hover, :focus-visible) {
    box-shadow: var(--btn-shadow-hover); translate: 0 -1px;
}
.btn:not(.btn-link, .btn-close, .nav-link, .dropdown-item):focus-visible, .btn-check:focus-visible + .btn:not(.btn-link) { box-shadow: var(--btn-shadow-hover), var(--bs-btn-focus-box-shadow, 0 0 0 .25rem rgb(13 110 253 / 50%)); }
:where(.btn, input:is([type="button"], [type="submit"], [type="reset"]), [role="button"], .page-link, .table-pager-nav :is(.page-step, ol a, ol button), .article-pagination ol :is(a, button), .article-category-bar :is(a, button), .post-share-rail :is(a, button),
    .admin-topbar-btn, .guide-btn, .guide-btn-primary, .guide-btn-icon, button.guide-chip, .jcdc-crop__primary, .jcdc-crop__secondary, .jcdc-crop__skip, .jcdc-crop__x, .jcdc-crop__ratios button,
    .pe-tile, .pe-lang, .editor-media-choice, .download-wait__hide, .form-problems-dialog__ok, .image-dialog__step, .dash-btn-ghost, .dash-btn-primary, .profile-page-cta__action, .login-language, .login-theme-toggle,
    .quiz-start-btn, .wa-action-btn, .appointment-submit-btn, .btn-3, .career-carousel-btn, .career-filter-pill, .career-notice-cat-pill, .filter-chip, .gallery-slider-arrow,
    .gallery-filter-btn, .gallery-tab-btn, .hero-arrow, .service-card-btn, .search-submit, .whatsapp-float, .gallery-split-slider :is(.carousel-control-prev, .carousel-control-next)):active { box-shadow: var(--btn-shadow-active); translate: none; }
.page-link:focus { box-shadow: var(--btn-shadow-hover), var(--bs-pagination-focus-box-shadow, 0 0 0 .25rem rgb(13 110 253 / 25%)); }
/* Disabled: no shadow, no lift (the :not(#id) term keeps this above every other shadow rule). */
:where(.btn, input:is([type="button"], [type="submit"], [type="reset"]), [role="button"], .page-link, .page-step, button):is(:disabled, [disabled], .disabled, [aria-disabled="true"]):not(#btn-shadow-off) { box-shadow: none; translate: none; }
input[type="file"]:disabled::file-selector-button { box-shadow: none; translate: none; }

/* UX-02/06/14/15/19: local scrolling, persistent actions and linked validation. */
.table-responsive, .table-scroll, [data-table-scroll] { position: relative; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.form-error-summary { margin-block: .75rem; padding: 1rem; border: 2px solid #b42318; border-radius: .5rem; background: #fff; color: #1f2937; overflow-wrap: anywhere; }
.form-error-summary h2 { font-size: 1.1em; margin: 0 0 .5em; }
.form-error-summary a { color: #9d2119; font-weight: 700; }
.form-error-summary:focus { outline: 3px solid #345da8; outline-offset: 2px; }
.required-fields-legend { font-size: .875em; margin-block: .5rem; }
.required-field-mark { color: inherit; }
.form-busy-status { display: flex; gap: .6em; align-items: center; }
.form-busy-status[hidden] { display: none; }
.form-busy-status:not([hidden])::before { content: ''; display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: download-wait-spin .8s linear infinite; }
[data-bs-theme="dark"] .form-error-summary { background: #1d1e1f; color: #e3e6ea; border-color: #ff8a80; }
[data-bs-theme="dark"] .form-error-summary a { color: #ff8a80; }
.modal-dialog { max-height: calc(100dvh - var(--bs-modal-margin, .5rem) - var(--bs-modal-margin, .5rem)); }
.modal-content { max-height: calc(100dvh - var(--bs-modal-margin, .5rem) - var(--bs-modal-margin, .5rem) - .5rem); }
.modal-content > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.modal-header, .modal-footer { flex-shrink: 0; }

.ui-draft-panel, .ui-session-warning { padding: 1rem; margin-block: .75rem; border: 1px solid currentColor; border-radius: .5rem; overflow-wrap: anywhere; }
.ui-draft-panel .btn { margin: .2rem; }
.ui-draft-menu > .dropdown-toggle { min-width: 44px; min-height: 44px; }
.ui-draft-menu > .dropdown-menu, .savebar-more.has-editor-draft > .dropdown-menu {
    width: min(22rem, calc(100vw - 1rem));
    min-width: 0;
    overflow: auto;
}
.dropdown-menu .ui-draft-panel { display: grid; gap: .5rem; margin: 0; padding: .65rem .75rem; border: 0; }
.dropdown-menu .ui-draft-panel p { margin: 0; }
.dropdown-menu .ui-draft-panel .btn { min-height: 44px; margin: 0; }
.ui-draft-panel [hidden], .ui-draft-editor-group[hidden] { display: none !important; }
.ui-draft-heading { font-weight: 700; }
.ui-draft-attention { box-shadow: inset 0 -3px var(--bs-warning); }
.ui-session-warning[hidden] { display: none; }
:is(.clinic-inline-dialog,.related-record-dialog) { width: min(42rem,calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1rem; color: var(--bs-body-color,#1f2937); background: var(--bs-body-bg,#fff); border: 1px solid currentColor; border-radius: .75rem; }
:is(.clinic-inline-dialog,.related-record-dialog)[open] { display: flex; flex-direction: column; }
:is(.clinic-inline-dialog,.related-record-dialog) > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.clinic-inline-body { overflow-y: auto; min-height: 0; }
.clinic-inline-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .75rem; flex-shrink: 0; }
:is(.clinic-inline-dialog,.related-record-dialog)::backdrop { background: rgb(0 0 0 / 55%); }
[data-bs-theme="dark"] input.is-invalid, [data-bs-theme="dark"] select.is-invalid, [data-bs-theme="dark"] textarea.is-invalid { border-color: #9f8b87 !important; }

.dropdown-menu { overflow-y: auto; max-height: calc(100dvh - 1rem); }
.interaction-help { z-index: 2200; overflow: auto; max-width: min(24rem,calc(100vw - 1rem)); padding: .6rem .8rem; border: 1px solid #707377; border-radius: .4rem; background: #1d1e1f; color: #f1f3f5; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.date-format-hint { display: block; font-size: .875em; }

html:has(dialog[open]) { overflow: hidden; }

/* Unavailable actions stay legible; the adjacent explanation and native disabled semantics carry their meaning. */
.btn:disabled, .btn.disabled, .btn[aria-disabled="true"] { opacity: 1 !important; color: #f9fafb !important; background-color: #374151 !important; border-color: #aab2be !important; cursor: not-allowed; }
[data-bs-theme="dark"] .btn:disabled, [data-bs-theme="dark"] .btn.disabled, [data-bs-theme="dark"] .btn[aria-disabled="true"] { color: #f9fafb !important; background-color: var(--dark-raised) !important; border-color: #aab2be !important; }

/* Long translated action labels remain inside their available width. */
.btn { max-width: 100%; white-space: normal !important; overflow-wrap: anywhere; }

/* Stable boundary luminance keeps text fields and their error/focus states visible in either theme. */
/* In-place related-record creation and conflict review retain visible titles/actions at phone and zoom widths. */
.related-record-dialog { width: min(46rem, calc(100vw - 1rem)); max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); padding: 1rem; border: 1px solid var(--bs-border-color, #8b8e94); border-radius: .75rem; background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #111827); overflow: hidden; }
.related-record-dialog[open] { display: flex; flex-direction: column; gap: .75rem; }
.related-record-dialog > h2 { flex-shrink: 0; margin: 0; overflow-wrap: anywhere; font-size: 1.25rem; }
.related-record-dialog > form { display: flex; flex-direction: column; gap: .75rem; min-height: 0; margin: 0; }
.related-record-dialog .clinic-inline-body { min-height: 0; overflow: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.related-record-dialog .clinic-inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; flex-shrink: 0; }
.related-record-dialog .form-control, .related-record-dialog .form-select { min-width: 0; max-width: 100%; }
.related-record-dialog::backdrop { background: rgb(0 0 0 / 55%); }

.form-control, .form-select { border-color: #8b8e94 !important; }
.form-control:focus-visible, .form-select:focus-visible, .btn:focus-visible, [role="button"]:focus-visible { outline: 2px solid #155e75; outline-offset: 2px; }
[data-bs-theme="dark"] .form-control:focus-visible, [data-bs-theme="dark"] .form-select:focus-visible, [data-bs-theme="dark"] .btn:focus-visible, [data-bs-theme="dark"] [role="button"]:focus-visible { outline-color: #7dd3fc; }

.modal [data-delete-confirm-message], .modal [data-product-confirm-message], #password-confirmation-message { white-space: pre-line; overflow-wrap: anywhere; }
