/* PATHO.DDx Extras · galleries are appended only to entities that have content. */
.ddx-app .ddxex-warning{font-size:12px!important;line-height:1.65;color:#76541f;background:#fff8e9;border-color:#deb36b!important}
.ddx-app .ddxex-gallery{margin:16px 0 6px;padding:0;border:1px solid #d2e3e6;border-radius:12px;background:#f9fcfd;overflow:hidden;box-shadow:0 2px 10px rgba(30,72,92,.035)}
.ddx-app .ddxex-gallery>summary{cursor:pointer;list-style:none;display:flex;gap:9px;align-items:center;padding:12px 14px;color:#225967;font-size:12px;font-weight:750;line-height:1.4;user-select:none}
.ddx-app .ddxex-gallery>summary::-webkit-details-marker{display:none}
.ddx-app .ddxex-gallery>summary:focus-visible{outline:2px solid #0c998b;outline-offset:-3px}
.ddx-app .ddxex-gallery>summary:after{content:"⌄";margin-left:auto;color:#7195a3;font-size:16px;font-weight:600;transition:transform .15s}
.ddx-app .ddxex-gallery[open]>summary:after{transform:rotate(180deg)}
.ddx-app .ddxex-gallery-icon{font-size:17px;color:#068e83}
.ddx-app .ddxex-pill{padding:3px 7px;border-radius:5px;background:#e3f3ef;color:#357b73;font-size:9px;font-weight:650}
.ddx-app .ddxex-gallery-content{border-top:1px solid #dfebef;padding:12px 14px 15px;font-size:11px;line-height:1.5}
.ddx-app .ddxex-article{display:inline-flex;gap:7px;align-items:center;margin:0 0 13px;padding:8px 13px;background:#0b777a;color:white!important;text-decoration:none!important;border-radius:7px;font-size:11px;font-weight:750}
.ddx-app .ddxex-article:before{content:"↗";font-size:13px}
.ddx-app .ddxex-article:hover{background:#09595e}
.ddx-app .ddxex-section+.ddxex-section{margin-top:15px}
.ddx-app .ddxex-section-title{font-size:10px;letter-spacing:.07em;text-transform:uppercase;font-weight:800;color:#637d8c;margin:2px 0 8px}
.ddx-app .ddxex-imagebar{display:flex;gap:11px;overflow-x:auto;padding:1px 1px 9px;scroll-snap-type:x proximity;scrollbar-width:thin}
.ddx-app .ddxex-figure{flex:0 0 172px;max-width:172px;overflow:hidden;border:1px solid #dce6eb;background:white;border-radius:10px;margin:0;scroll-snap-align:start}
.ddx-app .ddxex-photo{display:block;width:100%;height:115px;padding:0;border:0;background:#e5ebee;cursor:zoom-in}
.ddx-app .ddxex-photo:focus-visible{outline:2px solid #0c998b;outline-offset:-2px}
.ddx-app .ddxex-photo img{width:100%;height:100%;object-fit:cover;display:block}
.ddx-app .ddxex-figure figcaption{display:block;padding:8px 9px;color:#435c68;font-size:10px;line-height:1.4}
.ddx-app .ddxex-desc{display:block;font-weight:650;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:24px}
.ddx-app .ddxex-figure figcaption small{display:block;color:#83929b;margin-top:4px;font-size:9px}
.ddxex-dialog{max-height:93vh;max-width:min(1180px,95vw);padding:12px;border:0;border-radius:14px;box-shadow:0 25px 75px #101e2c88;background:#fff;color:#284653;overflow:auto}
.ddxex-dialog::backdrop{background:#061727c9;backdrop-filter:blur(3px)}
.ddxex-dialog>img{max-width:100%;max-height:75vh;object-fit:contain;display:block;margin:auto;border-radius:7px}
.ddxex-dialog>.ddxex-close{border:1px solid #d0dde3;background:white;padding:8px 11px;border-radius:6px;color:#4b6472;display:block;margin:0 0 10px auto;cursor:pointer;font:600 12px system-ui}
.ddxex-dialog-caption{display:flex;flex-wrap:wrap;gap:5px 14px;align-items:center;margin:10px 3px 2px;font:12px system-ui}
.ddxex-dialog-caption>span{color:#80939d}
.ddxex-dialog-caption>a{margin-left:auto}
@media(max-width:600px){.ddx-app .ddxex-figure{flex-basis:145px;max-width:145px}.ddx-app .ddxex-photo{height:100px}.ddx-app .ddxex-pill{display:none}}

/* 1.1: Standalone pan/zoom only if the site's native histology viewer is absent */
.ddxex-dialog{width:min(1120px,95vw);max-width:min(1120px,95vw);max-height:94vh;overflow:hidden}
.ddxex-viewerhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 7px 9px;font:600 13px system-ui;color:#2a4958}
.ddxex-viewerhead>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ddxex-viewerhead>.ddxex-close{margin:0;flex:none}
.ddxex-viewerbar{display:flex;align-items:center;gap:6px;background:#e9f1f3;padding:6px 10px;border-radius:8px 8px 0 0}
.ddxex-viewerbar>button{background:white;border:1px solid #c7d9de;border-radius:6px;padding:6px 13px;color:#245a62;font:600 12px system-ui;cursor:pointer}
.ddxex-viewerbar>button:focus-visible{outline:2px solid #10978d}
.ddxex-zoomstage{position:relative;overflow:hidden;display:flex;justify-content:center;align-items:center;height:min(69vh,790px);background:#142333;cursor:grab;touch-action:none;user-select:none}
.ddxex-zoomstage:active{cursor:grabbing}
.ddxex-zoomstage>img{display:block;width:100%;height:100%;object-fit:contain;transform-origin:center center;pointer-events:none;will-change:transform}
.ddxex-dialog .ddxex-dialog-caption{padding:7px 8px}
@media(max-width:600px){.ddxex-dialog{max-width:98vw;width:98vw;padding:6px}.ddxex-zoomstage{height:63vh}}

/* v1.2: media integrated into the already opened core diagnosis details. */
.ddx-app .ddxex-inline {margin:18px 0 5px;overflow:hidden;}
.ddx-app .ddxex-inline-heading {display:flex;align-items:center;gap:9px;padding:12px 15px;background:#eef7f8;font:750 12px/1.4 system-ui;color:#225967;}
.ddx-app .ddxex-inline .ddxex-gallery-content {padding:15px 16px 16px;}
.ddxex-error {display:block;color:#8a4a36;line-height:1.5;margin-bottom:8px;}
.ddxex-retry {border:1px solid #a4c5cd;background:#fff;border-radius:5px;padding:7px 10px;cursor:pointer;color:#225967;}
