/* Compact, keyboard-accessible health history and animal detail actions. */
.detail-heading-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;min-width:0;max-width:100%;flex:1 1 380px}
.detail-heading-actions .button{white-space:normal;text-align:center;min-height:46px;max-width:100%}
.page-heading:has(.detail-heading-actions){align-items:flex-start;flex-wrap:wrap}
.page-heading:has(.detail-heading-actions)>div:first-child{min-width:0;flex:1 1 260px}
.detail-tree-link{margin-bottom:18px;max-width:100%;white-space:normal;text-align:center}
.health-add-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 22px;min-width:0}
.health-add-actions>.button{max-width:100%;white-space:normal;text-align:center}
.health-add-actions>a:not(.button){font-size:13px;min-height:44px;display:inline-flex;align-items:center;font-weight:600}
.health-panel-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.health-panel-filters>div{min-width:0}.health-panel-filters label{font-size:12px;color:var(--muted)}
.health-panel-filters select{min-width:0;max-width:100%;width:100%;font-size:14px}
.health-range{font-size:13px;color:var(--muted);margin:0 0 12px}.health-loading{color:var(--green)}
.health-panel-error{padding:14px;background:#fcf0d6;border:1px solid #e4d49e;border-radius:10px;margin:10px 0;font-size:14px;overflow-wrap:anywhere}
.health-panel-error button{display:flex;margin-top:10px;min-height:44px}
.health-records{display:grid;gap:10px;min-width:0}
.health-entry.health-card{padding:0;margin:0;border:1px solid var(--line);border-radius:12px;background:white;box-shadow:none;min-width:0;overflow:clip}
.health-entry>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;padding:15px 16px;min-height:80px;font-weight:400;min-width:0}
.health-entry>summary::-webkit-details-marker{display:none}.health-entry>summary::marker{content:""}
.health-entry>summary:hover{background:#f7f9f2}.health-entry>summary:focus-visible{outline-offset:-3px;border-radius:11px}
.health-entry-main{display:block;min-width:0;flex:1}
.health-entry-datekind{display:block;font-size:11px;line-height:1.5;color:var(--muted);font-weight:500}
.health-entry-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;font-weight:650;line-height:1.4;margin-top:5px;overflow-wrap:anywhere;word-break:normal}
.health-entry-animal{display:block;color:var(--muted);font-size:12px;line-height:1.45;margin-top:5px;overflow-wrap:anywhere}
.health-entry-side{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:0 1 185px;min-width:24px;max-width:45%}
.health-entry-side .pill{white-space:normal;text-align:center;font-size:10px;line-height:1.4}
.health-entry-chevron{display:grid;place-items:center;font-size:23px;line-height:1;color:var(--green);width:22px;height:30px;flex-shrink:0;transition:transform .15s}
.health-entry[open]>summary{background:#f2f6eb;border-bottom:1px solid var(--line)}
.health-entry[open] .health-entry-title{-webkit-line-clamp:unset;display:block}
.health-entry[open] .health-entry-chevron{transform:rotate(180deg)}
.health-entry-body{padding:16px;min-width:0}
.health-entry-content{max-height:min(52vh,420px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 8px 0 0;overflow-wrap:anywhere;min-width:0}
.health-entry-content:focus-visible{outline-offset:1px}.health-entry-content h3{font-size:12px;letter-spacing:.2px;margin:15px 0 5px;color:var(--muted)}
.health-entry-content h3:first-child{margin-top:0}.health-entry-content p{font-size:14px;margin:0 0 13px;line-height:1.65}.health-entry-content p:last-child{margin-bottom:0}
.health-entry-body>.button-row{margin-top:16px;padding-top:13px;border-top:1px solid var(--line);gap:10px}
.health-entry-body .button-row>*{min-height:44px!important;font-size:13px!important}
.health-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px;padding-top:15px;border-top:1px solid var(--line);min-width:0}
.health-pagination>span{font-size:12px;color:var(--muted);text-align:center}.health-pagination button{min-height:44px;padding:10px 13px;font-size:13px;white-space:nowrap;min-width:0}
.animal-audit{padding:0;overflow:clip}.animal-audit>summary{display:grid;grid-template-columns:minmax(0,1fr) 24px;gap:3px 12px;padding:20px 22px;font-weight:600;list-style:none;cursor:pointer;min-height:80px}
.animal-audit>summary::-webkit-details-marker{display:none}.animal-audit>summary::marker{content:""}.animal-audit>summary>span:first-child{font-size:20px;letter-spacing:-.3px}
.animal-audit>summary>small{grid-column:1;font-size:12px;font-weight:400;color:var(--muted)}.animal-audit>summary>.audit-chevron{grid-row:1/3;grid-column:2;align-self:center;font-size:24px;color:var(--green);transition:transform .15s}
.animal-audit[open]>summary>.audit-chevron{transform:rotate(180deg)}.animal-audit[open]>summary{border-bottom:1px solid var(--line)}.animal-audit-content{padding:5px 22px 18px}.animal-audit>summary:focus-visible{outline-offset:-4px;border-radius:16px}
@media(max-width:800px){.detail-heading-actions{justify-content:flex-start;flex-basis:100%}.detail-heading-actions .button{flex:1 1 180px}}
@media(max-width:560px){.health-entry>summary{padding:13px 12px;gap:9px;flex-wrap:wrap;align-items:flex-start}.health-entry-main{flex-basis:calc(100% - 35px)}.health-entry-side{display:contents;max-width:none}.health-entry-side .pill{order:3;max-width:calc(100% - 36px);text-align:left;margin-top:1px}.health-entry-chevron{margin-left:auto}.health-entry-datekind{font-size:10px}.health-entry-title{font-size:14px}.health-entry-body{padding:14px 12px}.health-panel-filters{gap:9px}.health-panel-filters select{font-size:16px}.health-pagination{gap:6px;flex-wrap:wrap}.health-pagination button{padding:10px;font-size:12px}.health-pagination>span{font-size:11px}.detail-heading-actions{gap:9px}.detail-heading-actions .button{flex-basis:135px;font-size:13px;padding:11px 12px}.health-add-actions{gap:7px}.health-add-actions>.button{width:100%}.animal-audit>summary{padding:18px}.animal-audit>summary>span:first-child{font-size:19px}.animal-audit-content{padding:5px 18px 16px}}
@media(max-width:360px){.health-panel-filters{grid-template-columns:minmax(0,1fr)}.detail-heading-actions .button{flex-basis:100%}.health-pagination>span{flex-basis:100%;order:-1;padding-bottom:4px}.health-pagination button{flex:1}.health-entry-content{max-height:45vh}}
@media(prefers-reduced-motion:reduce){.health-entry-chevron,.audit-chevron{transition:none}}
