/* 1Y panels and document controls. Scoped so applicant and reviewer themes keep their styling. */
.ham-1y-response-summary,.ham-1y-response-panel{border:1px solid #b8d7df;border-radius:10px;padding:18px;margin:16px 0;background:#f4fafb;color:#16303d}
.ham-1y-receipt{padding:12px 0;border-top:1px solid #d6e4e8;overflow-wrap:anywhere}
.ham-1y-verbatim{white-space:pre-wrap;overflow-wrap:anywhere;max-height:none!important;line-height:1.55;margin:10px 0}
.ham-1y-response-panel form,.ham-1y-denial-control{display:block;margin:12px 0;padding:12px;border:1px solid #d6e4e8;border-radius:8px}
.ham-1y-response-panel form label,.ham-1y-denial-control label{display:block;margin:8px 0}
.ham-1y-response-panel button,.ham-1y-denial-control button{margin:8px 0}
.ham-workspace .ham-timeline details pre,.ham-workspace details .ham-1y-verbatim{max-height:none!important;overflow:visible!important;white-space:pre-wrap;overflow-wrap:anywhere}
body.ham-r6b-modal-open{overflow:hidden!important}
.ham-r6b-workbench-backdrop{position:fixed!important;inset:0!important;z-index:999998!important;background:rgba(8,24,33,.65)!important;border:0!important}
body>[data-r6b-workbench].is-r6b-enlarged{position:fixed!important;inset:14px!important;margin:0!important;width:auto!important;height:calc(100dvh - 28px)!important;max-height:calc(100dvh - 28px)!important;max-width:none!important;z-index:999999!important;background:#fff!important;color:#17313e;box-sizing:border-box;overflow:auto!important;border-radius:12px;padding:14px!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(260px,340px)!important;gap:12px!important;align-items:stretch!important}
body>[data-r6b-workbench].is-r6b-enlarged [data-document-viewer]{min-height:0!important;max-height:100%!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
body>[data-r6b-workbench].is-r6b-enlarged [data-viewer-canvas]{min-height:150px!important;flex:1 1 auto!important;height:auto!important;overflow:auto!important}
body>[data-r6b-workbench].is-r6b-enlarged [data-viewer-canvas] iframe{height:100%!important;min-height:180px!important;width:100%!important;border:0}
body>[data-r6b-workbench].is-r6b-enlarged [data-evidence-assessment]{max-height:100%!important;overflow:auto!important;min-width:0}
[data-viewer-action]{white-space:normal!important}
[data-viewer-document-counter],[data-viewer-page-counter]{display:inline-block;margin:4px 8px;font-size:12px}
[data-viewer-page-counter][hidden],button[data-viewer-action][hidden]{display:none!important}
.ham-1y-new-badge{display:inline-block;border-radius:4px;background:#f9dfea;color:#702549;padding:3px 6px;font-size:10px;font-weight:800;margin:3px}
.ham-upload-dropzone.is-dragover{outline:3px solid #007e9c;outline-offset:2px;background:#e4f7fa}
@media(max-width:850px){body>[data-r6b-workbench].is-r6b-enlarged{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(340px,65dvh) auto!important;inset:6px!important;height:calc(100dvh - 12px)!important;max-height:calc(100dvh - 12px)!important}body>[data-r6b-workbench].is-r6b-enlarged [data-evidence-assessment]{overflow:visible!important}}
/* Same-origin pop-out with independent document and PDF-page controls. */
.ham-1y-popup{margin:0;padding:12px;font:14px/1.45 Arial,sans-serif;background:#eef4f7;color:#17313e;box-sizing:border-box}
.ham-1y-popup h1{font-size:20px;margin:0 0 10px}.ham-1y-popup h2{font-size:17px;overflow-wrap:anywhere}
.ham-1y-popup nav{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding:10px;background:#fff;position:sticky;top:0;z-index:3;border-radius:8px}
.ham-1y-popup button,.ham-1y-popup a{padding:7px 10px;border-radius:5px;border:1px solid #477c90;background:#fff;color:#133f51;cursor:pointer;font-size:13px}
.ham-1y-popup button:disabled{opacity:.45;cursor:default}.ham-1y-popup [hidden]{display:none!important}
.ham-1y-popup-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;margin-top:12px;height:calc(100dvh - 180px);min-height:380px}
.ham-1y-popup-canvas{background:#dfe7ec;overflow:auto;display:flex;align-items:flex-start;justify-content:center}.ham-1y-popup-canvas iframe{height:100%;width:100%;border:0}.ham-1y-popup-canvas img{height:auto}
.ham-1y-popup-review{padding:14px;background:#fff;border-radius:8px;overflow:auto}
.ham-1y-popup label{display:block;margin:10px 0}.ham-1y-popup input,.ham-1y-popup select,.ham-1y-popup textarea{display:block;width:100%;box-sizing:border-box;padding:7px;margin-top:4px;font:inherit;border:1px solid #7895a1;border-radius:4px}
.ham-1y-popup-message{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:800px){.ham-1y-popup-layout{display:block;height:auto}.ham-1y-popup-canvas{height:60dvh;min-height:350px}.ham-1y-popup-review{overflow:visible;margin-top:12px}}
@media print{.ham-1y-popup nav,.ham-1y-popup-review,.ham-1y-popup-message,.ham-1y-popup h1{display:none}.ham-1y-popup-layout{display:block;height:auto}.ham-1y-popup-canvas{display:block;overflow:visible;background:#fff}.ham-1y-popup-canvas img{max-width:100%!important;transform:none!important}}

body>[data-r6b-workbench].is-r6b-enlarged .ham-evidence-inspector{max-height:100%;overflow:auto;min-height:0}
body>[data-r6b-workbench].is-r6b-enlarged .ham-document-toolbar{flex:0 0 auto;max-height:32dvh;overflow:auto;position:relative;display:flex;flex-wrap:wrap;gap:5px}
.ham-email-body__full,.ham-communication-body{max-height:none!important;overflow:visible!important;white-space:normal;overflow-wrap:anywhere}

body>[data-r6b-workbench].is-r6b-enlarged input,body>[data-r6b-workbench].is-r6b-enlarged select,body>[data-r6b-workbench].is-r6b-enlarged textarea{display:block;box-sizing:border-box;max-width:100%;width:100%;font:inherit;font-size:13px;padding:8px;border:1px solid #9bb5bf;border-radius:5px;background:#fff;color:#17313e}
body>[data-r6b-workbench].is-r6b-enlarged .ham-r6b-assessment-heading{display:block}
body>[data-r6b-workbench].is-r6b-enlarged .ham-r6b-assessment-heading h4{margin:5px 0;overflow-wrap:anywhere}
body>[data-r6b-workbench].is-r6b-enlarged .ham-evidence-inspector button{padding:7px 10px;border:1px solid #809fac;border-radius:5px;background:#fff;color:#123b4c;cursor:pointer}
body>[data-r6b-workbench].is-r6b-enlarged .ham-evidence-inspector .button-primary{background:#007fa3;color:#fff}

/* Keep primary assessment actions legible after the real workbench moves to body. */
body>[data-r6b-workbench].is-r6b-enlarged .ham-assessment-actions button{background:#007fa3!important;color:#fff!important;min-height:36px}
body>[data-r6b-workbench].is-r6b-enlarged .ham-evidence-inspector button:disabled{opacity:.55;cursor:not-allowed}

/* 1Y.1: make in-workbench review the primary upload action, not the external link.
 * Scope to the upload list so other actions retain their existing hierarchy.
 * Explicit styles survive the enlarged workbench being moved outside its shell.
 */
[data-r6b-workbench] .ham-r6b-file-actions .ham-review-upload-primary,
[data-r6b-workbench] .ham-r6b-file-actions .ham-open-original-secondary {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  height: auto !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 5px !important;
  text-align: center;
  text-decoration: none !important;
  white-space: normal !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
}
[data-r6b-workbench] .ham-r6b-file-actions .ham-review-upload-primary {
  min-height: 44px !important;
  padding: 10px 14px !important;
  background: #006bd6 !important;
  border-color: #006bd6 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
[data-r6b-workbench] .ham-r6b-file-actions .ham-review-upload-primary:not(:disabled):hover {
  background: #0056ad !important;
  border-color: #0056ad !important;
}
[data-r6b-workbench] .ham-r6b-file-actions .ham-open-original-secondary {
  min-height: 30px !important;
  padding: 5px 10px !important;
  background: #fff !important;
  border-color: #809fac !important;
  color: #123b4c !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
[data-r6b-workbench] .ham-r6b-file-actions .ham-open-original-secondary:hover {
  background: #edf6fb !important;
}
[data-r6b-workbench] .ham-r6b-file-actions .ham-review-upload-primary:focus-visible,
[data-r6b-workbench] .ham-r6b-file-actions .ham-open-original-secondary:focus-visible {
  outline: 3px solid #123b4c !important;
  outline-offset: 2px !important;
}
/* The selected file remains clearly marked Viewing and cannot be reselected. */
[data-r6b-workbench] .ham-r6b-file-actions .ham-review-upload-primary:disabled {
  background: #dff5e6 !important;
  border-color: #6aa87d !important;
  color: #174f2b !important;
  opacity: 1 !important;
  cursor: default !important;
}
