/* OBSERVACAO: Modal de exportação de relatório (impressão limpa). */
.ss-rp-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ss-rp-modal[hidden] {
  display: none !important;
}

.ss-rp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.ss-rp-modal-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.ss-rp-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ss-rp-modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #1b365d;
}

.ss-rp-modal-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.ss-rp-modal-x {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.ss-rp-modal-preview {
  flex: 1;
  min-height: 280px;
  background: #e2e8f0;
  padding: 0.75rem;
}

.ss-rp-iframe {
  width: 100%;
  height: min(52vh, 480px);
  border: 0;
  border-radius: 0.4rem;
  background: #fff;
}

.ss-rp-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

body.ss-rp-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .ss-rp-modal-actions {
    justify-content: stretch;
  }
  .ss-rp-modal-actions .ss-btn-table,
  .ss-rp-modal-actions .primary-action {
    flex: 1 1 calc(50% - 0.45rem);
  }
}
