/* Harthwyn 26.01.223 — canonical global responsive and design-system authority.
 * Consolidates the former 26.01.117 responsive baseline and 26.01.176 responsive system
 * in their established cascade order. Route-owned feature presentation remains separate.
 */

/* Harthwyn 26.01.117 — shared responsive authority loaded last on Harthwyn surfaces. */
.harthwyn-app *, .harthwyn-shell *, .harthwyn-admin *, .wrap[class*="harthwyn"] *, body[class*="harthwyn"] * { box-sizing:border-box; }
.harthwyn-app, .harthwyn-shell, .harthwyn-admin, .wrap[class*="harthwyn"], body[class*="harthwyn"] #wpbody-content { min-width:0; max-width:100%; }
.harthwyn-app img, .harthwyn-shell img, .harthwyn-admin img, .wrap[class*="harthwyn"] img { max-width:100%; height:auto; }
.harthwyn-app video, .harthwyn-app iframe, .harthwyn-shell video, .harthwyn-shell iframe { max-width:100%; }
.harthwyn-app :is(p,li,td,th,a,button,label,legend,h1,h2,h3,h4), .harthwyn-shell :is(p,li,td,th,a,button,label,legend,h1,h2,h3,h4), .wrap[class*="harthwyn"] :is(p,li,td,th,a,button,label,legend,h1,h2,h3,h4) { overflow-wrap:anywhere; }
.harthwyn-app :is(.harthwyn-grid,.harthwyn-card-grid,.harthwyn-actions,.harthwyn-toolbar,.harthwyn-page-header), .harthwyn-shell :is(.harthwyn-grid,.harthwyn-card-grid,.harthwyn-actions,.harthwyn-toolbar,.harthwyn-page-header) { min-width:0; }
.harthwyn-app :is(input,select,textarea,button), .harthwyn-shell :is(input,select,textarea,button), .wrap[class*="harthwyn"] :is(input,select,textarea,button) { max-width:100%; }
.harthwyn-app :is(button,.button,[role="button"],input[type="submit"]), .harthwyn-shell :is(button,.button,[role="button"],input[type="submit"]), .wrap[class*="harthwyn"] :is(button,.button,[role="button"],input[type="submit"]) { min-height:44px; white-space:normal; line-height:1.25; }
.harthwyn-responsive-table { width:100%; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; -webkit-overflow-scrolling:touch; border-radius:12px; }
.harthwyn-responsive-table > table { width:100%; min-width:640px; margin:0; }
.harthwyn-responsive-table:focus { outline:3px solid rgba(34,113,177,.28); outline-offset:2px; }
.harthwyn-mobile-nav, .harthwyn-member-nav, .harthwyn-desktop-nav, .nav-tab-wrapper { scrollbar-width:thin; }
.harthwyn-modal, .harthwyn-dialog, [class*="harthwyn"][role="dialog"]:not(.harthwyn-event-composer-drawer):not(.harthwyn-support-panel) { width:min(720px, calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; }
@media (max-width:1024px){
  .harthwyn-app :is(.harthwyn-two-column,.harthwyn-three-column,.harthwyn-dashboard-grid,.harthwyn-profile-grid), .harthwyn-shell :is(.harthwyn-two-column,.harthwyn-three-column,.harthwyn-dashboard-grid,.harthwyn-profile-grid) { grid-template-columns:minmax(0,1fr) !important; }
  .harthwyn-app :is(.harthwyn-actions,.harthwyn-toolbar,.harthwyn-page-header), .harthwyn-shell :is(.harthwyn-actions,.harthwyn-toolbar,.harthwyn-page-header) { flex-wrap:wrap; }
}
@media (max-width:782px){
  body[class*="harthwyn"] #wpcontent { padding-left:10px; }
  body[class*="harthwyn"] #wpbody-content, .wrap[class*="harthwyn"] { width:100%; margin-right:0; }
  .wrap[class*="harthwyn"] .form-table, .wrap[class*="harthwyn"] .form-table tbody, .wrap[class*="harthwyn"] .form-table tr, .wrap[class*="harthwyn"] .form-table th, .wrap[class*="harthwyn"] .form-table td { display:block; width:100%; }
  .wrap[class*="harthwyn"] .form-table th { padding:16px 0 6px; }
  .wrap[class*="harthwyn"] .form-table td { padding:0 0 16px; }
  .wrap[class*="harthwyn"] .nav-tab-wrapper { display:flex; gap:6px; overflow-x:auto; white-space:nowrap; padding-bottom:6px; }
  .wrap[class*="harthwyn"] .nav-tab { flex:0 0 auto; margin:0; }
  .harthwyn-app, .harthwyn-shell { padding-inline:clamp(12px,4vw,24px); }
  .harthwyn-app :is(.harthwyn-actions,.harthwyn-toolbar), .harthwyn-shell :is(.harthwyn-actions,.harthwyn-toolbar) { display:flex; align-items:stretch; gap:10px; }
  .harthwyn-app :is(.harthwyn-actions,.harthwyn-toolbar) > *, .harthwyn-shell :is(.harthwyn-actions,.harthwyn-toolbar) > * { flex:1 1 180px; }
  .harthwyn-app :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea), .harthwyn-shell :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { width:100%; font-size:16px; }
  .harthwyn-responsive-table > table { min-width:560px; }
}
@media (max-width:480px){
  .harthwyn-app, .harthwyn-shell { padding-inline:12px; }
  .harthwyn-app :is(.button,button,input[type="submit"]), .harthwyn-shell :is(.button,button,input[type="submit"]) { width:100%; justify-content:center; text-align:center; }
  .harthwyn-app :is(.harthwyn-actions,.harthwyn-toolbar), .harthwyn-shell :is(.harthwyn-actions,.harthwyn-toolbar) { display:grid; grid-template-columns:1fr; }
  .harthwyn-message-bubble { max-width:100% !important; }
  .harthwyn-responsive-table > table { min-width:520px; }
}
@media (prefers-reduced-motion:reduce){
  .harthwyn-app *, .harthwyn-shell *, .wrap[class*="harthwyn"] * { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}


/* Consolidated responsive-system rules. */
/* Harthwyn 26.01.176 — calendar modal and full responsive system repair. */
:root{--hw176-safe-top:max(16px,env(safe-area-inset-top));--hw176-safe-right:max(16px,env(safe-area-inset-right));--hw176-safe-bottom:max(16px,env(safe-area-inset-bottom));--hw176-safe-left:max(16px,env(safe-area-inset-left))}
html{overflow-x:clip}body[class*="harthwyn"]{max-width:100%;overflow-x:clip}
body[class*="harthwyn"] :where(.harthwyn-app,.harthwyn-shell,.harthwyn-managed-page,.harthwyn-page-shell,.harthwyn-admin,.wrap[class*="harthwyn"]){min-width:0;max-width:100%}
body[class*="harthwyn"] :where(img,video,canvas,svg,iframe){max-width:100%;height:auto}
body[class*="harthwyn"] :where(input:not([type=checkbox]):not([type=radio]),select,textarea){max-width:100%}
body[class*="harthwyn"] :where(.harthwyn-grid,.harthwyn-card-grid,.harthwyn-actions,.harthwyn-toolbar,.harthwyn-page-header,.harthwyn-form-row,.harthwyn-panel,.harthwyn-card){min-width:0}
body[class*="harthwyn"] :where(p,li,dd,dt,td,th,label,legend,a,button,h1,h2,h3,h4){overflow-wrap:anywhere}

/* Calendar/event composer: the overlay itself must remain viewport-wide. */
.harthwyn-event-composer-drawer[role="dialog"]{position:fixed!important;inset:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(320px,760px)!important;align-items:stretch!important;z-index:1000000!important;isolation:isolate}
.harthwyn-event-composer-drawer[hidden]{display:none!important}
.harthwyn-event-composer-backdrop{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;border-radius:0!important;z-index:0!important}
.harthwyn-event-composer-sheet{position:relative!important;grid-column:2!important;align-self:center!important;justify-self:end!important;width:min(760px,calc(100vw - 32px))!important;max-width:760px!important;height:min(900px,calc(100dvh - 32px))!important;max-height:calc(100dvh - 32px)!important;margin:16px!important;border-radius:24px!important;overflow:hidden!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;z-index:1!important}
.admin-bar .harthwyn-event-composer-drawer[role="dialog"]{top:var(--wp-admin--admin-bar--height,32px)!important;height:calc(100dvh - var(--wp-admin--admin-bar--height,32px))!important}
.admin-bar .harthwyn-event-composer-sheet{height:min(900px,calc(100dvh - var(--wp-admin--admin-bar--height,32px) - 32px))!important;max-height:calc(100dvh - var(--wp-admin--admin-bar--height,32px) - 32px)!important}
.harthwyn-event-composer-topbar{position:relative!important;top:auto!important;z-index:6!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;padding:clamp(16px,2.2vw,24px)!important;padding-right:max(16px,var(--hw176-safe-right))!important;background:var(--hw-color-surface,#fff)!important}
.harthwyn-event-composer-topbar>div{min-width:0;padding-right:8px}
.harthwyn-event-composer-close{position:relative!important;inset:auto!important;display:inline-grid!important;place-items:center!important;width:48px!important;min-width:48px!important;height:48px!important;min-height:48px!important;margin:0!important;padding:0!important;line-height:1!important;font-size:28px!important;overflow:visible!important;visibility:visible!important;opacity:1!important;z-index:8!important}
.harthwyn-event-composer-body{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;scrollbar-gutter:stable!important;padding-bottom:0!important}
.harthwyn-event-save-actions{position:sticky!important;bottom:0!important;z-index:7!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;margin:1.25rem -1.2rem -1.2rem!important;padding:16px 20px max(16px,var(--hw176-safe-bottom))!important;background:rgba(255,255,255,.98)!important}
.harthwyn-event-save-actions>.harthwyn-button{flex:0 1 auto!important;min-width:132px}
.harthwyn-event-close-action{display:inline-flex!important}

/* Tables, filters, media and selectors remain usable instead of shrinking beyond recognition. */
body[class*="harthwyn"] :where(.harthwyn-responsive-table,.harthwyn-table-wrap,.wp-list-table-container){max-width:100%;overflow:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
body[class*="harthwyn"] :where(.harthwyn-media-grid,.harthwyn-member-grid,.harthwyn-record-grid,.harthwyn-card-grid){grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
body[class*="harthwyn"] :where(.harthwyn-people-selector,.select2-container,.choices,.choices__inner){max-width:100%!important;width:100%!important}
body[class*="harthwyn"] :where(.select2-dropdown,.choices__list--dropdown){max-width:calc(100vw - 24px)!important}

@media(max-width:1024px){
 .harthwyn-event-composer-drawer[role="dialog"]{grid-template-columns:minmax(0,1fr)!important;place-items:center!important}
 .harthwyn-event-composer-sheet{grid-column:1!important;justify-self:center!important}
 body[class*="harthwyn"] :where(.harthwyn-two-column,.harthwyn-three-column,.harthwyn-dashboard-grid,.harthwyn-profile-grid,.harthwyn-admin-workspace){grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:782px){
 .admin-bar .harthwyn-event-composer-drawer[role="dialog"]{top:46px!important;height:calc(100dvh - 46px)!important}
 .admin-bar .harthwyn-event-composer-sheet{height:calc(100dvh - 46px)!important;max-height:calc(100dvh - 46px)!important}
 body[class*="harthwyn"] :where(.harthwyn-actions,.harthwyn-toolbar,.harthwyn-page-header__actions){flex-wrap:wrap}
 body[class*="harthwyn"] :where(.harthwyn-form-row--two,.harthwyn-form-row--three){grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:600px){
 .harthwyn-event-composer-sheet{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;align-self:stretch!important}
 .admin-bar .harthwyn-event-composer-sheet{height:calc(100dvh - 46px)!important;max-height:calc(100dvh - 46px)!important}
 .harthwyn-event-composer-topbar{padding:12px max(12px,var(--hw176-safe-right)) 12px max(12px,var(--hw176-safe-left))!important}
 .harthwyn-event-composer-topbar h2{font-size:clamp(1.1rem,6vw,1.35rem)!important}
 .harthwyn-event-composer-close{width:46px!important;min-width:46px!important;height:46px!important;min-height:46px!important}
 .harthwyn-event-composer-body{padding:16px max(12px,var(--hw176-safe-right)) 0 max(12px,var(--hw176-safe-left))!important}
 .harthwyn-event-save-actions{display:grid!important;grid-template-columns:1fr 1fr!important;margin:1rem calc(-1 * max(12px,var(--hw176-safe-right))) 0 calc(-1 * max(12px,var(--hw176-safe-left)))!important;padding-inline:max(12px,var(--hw176-safe-left)) max(12px,var(--hw176-safe-right))!important}
 .harthwyn-event-save-actions>.harthwyn-button{width:100%!important;min-width:0!important}
 body[class*="harthwyn"] :where(.harthwyn-calendar-nav-actions){grid-template-columns:1fr!important}
}
@media(max-width:380px){.harthwyn-event-save-actions{grid-template-columns:1fr!important}.harthwyn-event-composer-eyebrow{font-size:.65rem!important}}
@media(orientation:landscape) and (max-height:520px){
 .harthwyn-event-composer-sheet{height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important}
 .harthwyn-event-composer-topbar{padding-block:8px!important}.harthwyn-event-composer-topbar p{display:none}
}
@media(forced-colors:active){.harthwyn-event-composer-close{border:2px solid ButtonText!important}.harthwyn-event-composer-sheet{border:1px solid CanvasText!important}}
@media(prefers-reduced-motion:reduce){.harthwyn-event-composer-drawer *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Harthwyn 26.01.235 managed content containment. */
body.harthwyn-managed-page :where(img,video,iframe,canvas,svg){max-width:100%}body.harthwyn-managed-page :where(input,select,textarea,button){max-width:100%;box-sizing:border-box}body.harthwyn-managed-page :where(.harthwyn-shell,.harthwyn-panel,.harthwyn-form,.harthwyn-profile-workspace-260191,.harthwyn-messages-center,.harthwyn-events-hub){min-width:0;box-sizing:border-box}@media(max-width:1024px){body.harthwyn-managed-page :where(.harthwyn-shell,.harthwyn-managed-page__content,.harthwyn-messages-layout,.harthwyn-event-editor-layout,.harthwyn-profile-workspace-260191){min-width:0!important;max-width:100%!important}.harthwyn-events-calendar-panel{overflow-x:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-x}}
