/* Minimal enhancement loaded after the stable Ordenatec frontend. */

.report-content .ordenatec-summary details.accordion > summary.section-title::before {
  margin: 0 16px 0 0 !important;
  vertical-align: middle !important;
}

.report-content
  .ordenatec-summary
  details.accordion
  > summary.section-title[data-ordenatec-short-risk-title] {
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.report-content
  .ordenatec-summary
  [data-ordenatec-strategic-conclusion] {
  display: block !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.report-content
  .ordenatec-summary
  .report-ai-disclaimer[data-ordenatec-ai-disclaimer] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin: 4px 0 0 !important;
  padding: 4px 2px 0 !important;
  color: #6b7c93 !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

/* Generated summaries can express immediate actions as either divs or spans.
   A span must become a real block; otherwise its padding and border are drawn
   over the following lines without increasing the line box. */
.report-content .ordenatec-summary .action-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-column: 1 / -1 !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 8px !important;
}

.report-content .ordenatec-summary .action-row {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 0 8px !important;
  white-space: normal !important;
}

.report-content .ordenatec-summary .action-row:last-child {
  margin-bottom: 0 !important;
}

.report-content .ordenatec-summary .action-stack > .action-row {
  margin-bottom: 0 !important;
}

.report-content .ordenatec-summary .critical-strip {
  display: block !important;
}

#ordenatec-report-content > .report-pdf-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px clamp(14px, 2vw, 24px) 18px;
  background: linear-gradient(180deg, #f3f7fd 0%, #eaf2fb 100%);
  border-top: 1px solid #dbe6f4;
}

.report-pdf-button {
  display: inline-flex;
  min-width: 280px;
  min-height: 44px;
  padding: 7px 13px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #06233d;
  background: linear-gradient(135deg, #9af4ff 0%, #8ff1cf 100%);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(16, 207, 232, 0.16);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.report-pdf-button:hover {
  filter: brightness(1.035);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(16, 207, 232, 0.22);
}

.report-pdf-button:focus-visible {
  outline: 3px solid rgba(23, 92, 255, 0.24);
  outline-offset: 3px;
}

.report-pdf-button:disabled {
  cursor: wait;
  filter: saturate(0.7);
  opacity: 0.78;
  transform: none;
}

.report-pdf-button svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.report-pdf-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
}

.report-pdf-copy strong {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.report-pdf-copy small {
  color: #31526d;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

.pdf-export-frame {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  border: 0;
  pointer-events: none;
}

@media (max-width: 680px) {
  .report-content .ordenatec-summary details.accordion > summary.section-title::before {
    margin-right: 14px !important;
  }

  #ordenatec-report-content > .report-pdf-footer {
    padding: 13px 12px 15px;
  }

  .report-pdf-button {
    min-width: 0;
    width: 100%;
  }

  .report-pdf-copy {
    align-items: center;
    text-align: center;
  }
}

@media print {
  .report-pdf-footer,
  .pdf-export-frame {
    display: none !important;
  }
}
