.rcl-case-pdf-offer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 251, 235, 0.92));
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}
.rcl-case-pdf-offer > div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.rcl-case-pdf-offer strong { color: #14213d; font-size: 1.05rem; }
.rcl-case-pdf-offer small { grid-column: 2; color: #64748b; margin-top: 3px; }
.rcl-case-pdf-icon { grid-row: 1 / span 2; font-size: 1.8rem; }
.rcl-case-pdf-button,
.rcl-case-pdf-modal-confirm {
  min-height: 46px;
  padding: 11px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font: 750 0.93rem/1.2 inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}
.rcl-case-pdf-button.is-purchased { background: linear-gradient(135deg, #047857, #059669); }
.rcl-case-pdf-button:disabled { opacity: 0.68; cursor: wait; }
.rcl-case-pdf-button:focus-visible,
.rcl-case-pdf-modal button:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.rcl-case-pdf-status { grid-column: 1 / -1; min-height: 1em; color: #475569; font-size: 0.86rem; }
.rcl-case-pdf-locked { padding: 12px 16px; border-radius: 12px; background: #f8fafc; color: #64748b; }
.ua-pdf-item.rcl-case-pdf-offer { margin: 0; padding: 18px; border-radius: 16px; box-shadow: none; }
.ua-pdf-item.rcl-case-pdf-offer > .ua-pdf-item-main { display: flex; }

.rcl-case-pdf-catalog-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 18px;
}
.rcl-case-pdf-catalog-action .rcl-case-pdf-button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 999px;
}
.rcl-case-pdf-catalog-action .rcl-case-pdf-status {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.rcl-case-pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}
.rcl-case-pdf-dialog {
  position: relative;
  width: min(92vw, 420px);
  max-height: min(88vh, 620px);
  overflow: auto;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}
.rcl-case-pdf-dialog h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.25; }
.rcl-case-pdf-modal-message { margin: 0; white-space: pre-line; color: #475569; font-size: 16px; line-height: 1.55; }
.rcl-case-pdf-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.rcl-case-pdf-modal-cancel {
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.rcl-case-pdf-modal-confirm {
  border-radius: 999px;
}
body.rcl-case-pdf-modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .rcl-case-pdf-offer { grid-template-columns: 1fr; }
  .rcl-case-pdf-button { width: 100%; }
  .rcl-case-pdf-catalog-action { display: grid; padding: 0 14px 14px; }
  .rcl-case-pdf-catalog-action .rcl-case-pdf-status { grid-row: 2; text-align: center; }
  .rcl-case-pdf-modal { place-items: center; padding: 16px; }
  .rcl-case-pdf-dialog { width: min(100%, 420px); max-height: 90vh; border-radius: 16px; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); }
  .rcl-case-pdf-modal-actions { flex-direction: column-reverse; }
  .rcl-case-pdf-modal-actions button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rcl-case-pdf-modal { backdrop-filter: none; }
}

/* Completion PDF offer follows the active dark Cases theme. */
body.riddler-theme-dark .ecr-completion .rcl-case-pdf-offer {
  border-color: rgba(96, 165, 250, 0.28) !important;
  background: linear-gradient(135deg, rgba(17, 30, 52, 0.98), rgba(15, 23, 42, 0.96)) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22) !important;
}

body.riddler-theme-dark .ecr-completion .rcl-case-pdf-offer strong {
  color: #e5edf8 !important;
}

body.riddler-theme-dark .ecr-completion .rcl-case-pdf-offer small,
body.riddler-theme-dark .ecr-completion .rcl-case-pdf-status {
  color: #9fb0c7 !important;
}

/* v1.5.150 — Keep Case PDF actions independent from global theme button states. */
.rcl-case-pdf-button:hover,
.rcl-case-pdf-button:focus,
.rcl-case-pdf-button:focus-visible,
.rcl-case-pdf-modal-confirm:hover,
.rcl-case-pdf-modal-confirm:focus,
.rcl-case-pdf-modal-confirm:focus-visible {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.rcl-case-pdf-button.is-purchased:hover,
.rcl-case-pdf-button.is-purchased:focus,
.rcl-case-pdf-button.is-purchased:focus-visible {
  background: linear-gradient(135deg, #047857, #059669) !important;
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.rcl-case-pdf-modal-cancel:hover,
.rcl-case-pdf-modal-cancel:focus,
.rcl-case-pdf-modal-cancel:focus-visible {
  background: #1f2937 !important;
  background-color: #1f2937 !important;
  color: #ffffff !important;
  border-color: transparent !important;
}
