/* MioPDF v98: final overrides for the existing compact editor. */
.editor-identity { flex: 0 0 auto; min-width: 0 !important; }
.editor-identity > .editor-brand-image {
  display: block; width: 260px !important; height: 64px !important;
  max-width: none !important; object-fit: cover !important; object-position: center;
}
.optimization-command > .optimization-panel {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 28px 12px 30px 26px !important; gap: 3px !important;
  padding: 5px 8px !important; height: 118px !important; min-height: 118px !important;
}
.optimization-command > .optimization-panel > div { grid-row: 1 !important; min-height: 0 !important; }
.optimization-command #optimizationLevelLabel { grid-row: 2 !important; margin: 0 !important; line-height: 12px !important; }
.optimization-command #optimizeWeightBtn,
.optimization-command #resetOptimizationBtn {
  width: 100% !important; min-width: 0 !important; min-height: 0 !important;
  margin: 0 !important; padding: 2px 6px !important; border-radius: 8px !important;
  font-size: 10px !important; line-height: 1.1 !important;
}
.optimization-command > .optimization-panel > button#optimizeWeightBtn { grid-row: 3 !important; height: 30px !important; min-height: 30px !important; }
.optimization-command #resetOptimizationBtn {
  grid-row: 4 !important; height: 26px !important; color: #334155;
  background: #f1f5f9; border: 1px solid #dbe3ed; font-weight: 750;
}
.optimization-command #resetOptimizationBtn:hover:enabled { background: #e2e8f0; border-color: #94a3b8; }
.optimization-command button:disabled { opacity: .45; cursor: default; }
.toolbar-label { text-transform: uppercase; }
.extract-command .extract-control { gap: 2px !important; padding: 1px 0 !important; }
.extract-command .extract-groups { min-height: 0 !important; grid-template-rows: none !important; flex: 0 0 auto; }
.extract-command .extract-help {
  flex: 0 0 auto; width: 100%; margin: 0; padding: 0;
  color: #526178; font-size: 10px; line-height: 12px; text-align: center;
  white-space: normal; overflow: visible; text-overflow: clip;
}
.upload-use-notice { order: 3; max-width: 900px; margin: 18px auto 22px; padding: 0 16px; text-align: center; color: #64748b; font-size: 12px; line-height: 1.65; }
.upload-use-notice p { margin: 0 0 4px; }
.upload-use-notice > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.upload-use-notice button { color: #475569; background: transparent; border: 0; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; }
.upload-use-notice small { display: block; margin-top: 4px; font-size: 11px; }
.site-footer { display: flex !important; flex-wrap: wrap; align-items: center !important; justify-content: space-between !important; gap: 22px !important; padding: 28px 32px !important; background: #fff; border-top: 1px solid #e2e8f0; }
.footer-project { display: grid; gap: 7px; }
.footer-project > strong { color: #1e293b; font-size: 17px; }
.footer-project .beta-label { color: #9f1239; font-size: 11px; font-weight: 700; }
.footer-project p { margin: 0; color: #64748b; font-size: 12px; }
.site-footer nav { display: flex !important; flex-wrap: wrap; gap: 6px 8px !important; }
.site-footer nav button { padding: 10px 12px !important; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; font-size: 12px; color: #475569; cursor: pointer; }
.site-footer nav button:hover { border-color: #fecdd3; color: #e11d48; background: #fff1f2; }
#downloadModal .download-card { width: min(820px, calc(100vw - 32px)); max-height: calc(100dvh - 36px); overflow-y: auto; padding: 28px; }
#downloadModal .download-card > header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
#downloadModal .download-card h2 { margin: 0; }
#closeDownloadModalBtn, #closeInfoModalBtn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 48px;
  width: 48px !important; height: 48px !important; min-height: 48px;
  border: 0 !important; border-radius: 12px !important; background: #ed1834 !important;
  color: #fff !important; font-size: 36px !important; line-height: 1 !important;
  font-weight: 500; cursor: pointer;
}
#closeDownloadModalBtn:hover, #closeInfoModalBtn:hover { background: #be123c !important; }
.pdf-output-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #fecdd3; background: #fff5f6; border-radius: 14px; margin-bottom: 16px; }
.pdf-output-icon { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 62px; color: #fff; background: #ef233c; font-size: 15px; border-radius: 10px; }
.pdf-output-card > div { display: grid; gap: 5px; }
.pdf-output-card strong { color: #be123c; font-size: 15px; }
.pdf-output-card span { color: #64748b; font-size: 13px; }
.download-individual-heading { grid-column: 1 / -1; margin: 0 0 2px; font-size: 12px; font-weight: 700; color: #64748b; }
#downloadGroupList { display: grid; grid-template-columns: 1fr; gap: 9px; }
#downloadGroupList:empty { display: none; }
#downloadGroupList .download-group-button { display: grid; grid-template-columns: 38px minmax(0,1fr) auto 16px; grid-template-rows: auto; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; text-align: start; }
#downloadGroupList .download-group-button > span { font-size: 12px; grid-column: 1; grid-row: 1; }
#downloadGroupList .download-group-button > strong { font-size: 13px; grid-column: 2; grid-row: 1; align-self: center; }
#downloadGroupList .download-group-button > small { font-size: 11px; grid-column: 3; grid-row: 1; align-self: center; white-space: nowrap; }
#downloadGroupList .download-group-button > b { grid-column: 4; grid-row: 1; }
#downloadSingleBtn { margin-top: 16px; width: 100%; }
.download-review { color: #64748b; text-align: center; font-size: 12px; line-height: 1.5; margin: 16px 0 8px; }
#infoModal .info-card { width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 36px); padding: 28px; display: flex; flex-direction: column; overflow: hidden; }
#infoModal .info-card > header { flex: 0 0 auto; align-items: center; gap: 20px; }
#infoModalBody { overflow-y: auto; overscroll-behavior: contain; padding: 4px 10px 8px 0; }
.info-language { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 0 18px; color: #64748b; font-size: 12px; }
.info-language select { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 12px; background: #fff; color: #334155; }
.info-sections section { margin-bottom: 22px; }
.info-sections h3 { margin: 0 0 8px; color: #1e293b; font-size: 16px; line-height: 1.4; }
.info-sections p { margin: 0; color: #526178; font-size: 14px; line-height: 1.8; }
.faq-item { border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 15px 17px; font-size: 14px; font-weight: 750; color: #334155; line-height: 1.5; }
.faq-item[open] summary { color: #be123c; background: #fff5f6; }
.faq-item p { padding: 16px 17px; }
.info-contact-link { display: inline-flex; align-items: center; gap: 18px; color: #be123c; background: #fff1f2; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; margin-top: 8px; }
.translation-privacy-notice { border-inline-start: 3px solid #d97706; background: #fffbeb; padding: 12px 14px; color: #854d0e; font-size: 12px; line-height: 1.7; }
:is(.site-footer, .upload-use-notice, #infoModal, #downloadModal) :is(button, a, select, summary):focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
@media (max-width: 760px) {
  .editor-identity > .editor-brand-image { width: 200px !important; height: 56px !important; }
  .site-footer { padding: 24px 18px !important; }
  .site-footer nav { width: 100%; }
  .site-footer nav button { flex: 1 1 145px; }
  #downloadModal .download-card, #infoModal .info-card { padding: 20px; }
  #downloadGroupList .download-group-button { grid-template-columns: 34px 1fr 16px; gap: 8px; }
  #downloadGroupList .download-group-button > small { grid-column: 2; grid-row: 2; }
  #downloadGroupList .download-group-button > b { grid-column: 3; grid-row: 1 / 3; }
  .upload-use-notice { padding: 0 4px; }
}

.editor-primary-actions .editor-language { min-width: 176px !important; width: 176px !important; }
@media (max-width: 760px) { .editor-primary-actions .editor-language { min-width: 140px !important; width: 140px !important; } }
