/* ContractIQ: full-document viewing without changing submission logic */
body.ciq-full-document-open {
  overflow: hidden;
}

#intake .ciq-viewer.is-expanded {
  position: fixed !important;
  inset: 14px !important;
  z-index: 10000 !important;
  width: auto !important;
  max-width: none !important;
  height: calc(100vh - 28px) !important;
  margin: 0 !important;
  background: #fff !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 90px rgba(10, 37, 64, 0.28) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

#intake .ciq-viewer.is-expanded header {
  position: relative;
  z-index: 3;
  min-height: 58px;
  padding: 10px 16px !important;
  background: #fff;
  border-bottom: 1px solid #d9e2ec;
}

#intake .ciq-viewer.is-expanded .ciq-document-surface {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding: 18px !important;
  background: #eef3f8 !important;
}

#intake .ciq-viewer.is-expanded .ciq-rich-preview,
#intake .ciq-viewer.is-expanded .ciq-sheet-preview,
#intake .ciq-viewer.is-expanded .ciq-word-preview {
  width: min(1180px, 100%) !important;
  min-width: 0 !important;
  max-width: 1180px !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  overflow: visible !important;
  background: #fff;
  box-shadow: 0 8px 28px rgba(10, 37, 64, 0.12);
}

#intake .ciq-viewer.is-expanded iframe {
  display: block;
  width: 100% !important;
  height: calc(100vh - 112px) !important;
  min-height: calc(100vh - 112px) !important;
  border: 0 !important;
  background: #fff;
}

#intake .ciq-viewer.is-expanded .ciq-warning-glow {
  position: sticky;
  bottom: 12px;
  max-width: 720px;
  margin: 12px auto 0;
}

.ciq-full-doc-close {
  appearance: none;
  border: 1px solid #cbd8e6;
  background: #f7f9fc;
  color: #0a2540;
  border-radius: 10px;
  padding: 8px 13px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.ciq-full-doc-close:hover {
  background: #eaf1f8;
}

@media (max-width: 800px) {
  #intake .ciq-viewer.is-expanded {
    inset: 6px !important;
    height: calc(100vh - 12px) !important;
    border-radius: 12px !important;
  }

  #intake .ciq-viewer.is-expanded .ciq-document-surface {
    padding: 8px !important;
  }
}
