/* Minimal styling + RTL tweaks */
.card { border: 0; box-shadow: 0 6px 20px rgba(0,0,0,.06); border-radius: 16px; }
.btn, .form-control, .form-select { border-radius: 12px; }
.nav-pills .nav-link { border-radius: 12px; }
.doc-thumb { max-height: 520px; width: 100%; object-fit: contain; border-radius: 12px; }
.small-muted { font-size: .9rem; color: #6c757d; }

html[dir="rtl"] body { font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
html[dir="rtl"] .text-end { text-align: left !important; }
html[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: .5rem !important; }
html[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem !important; }

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
}

/* Make embeds always fit the screen width */
iframe, embed, object, img {
  max-width: 100% !important;
}

/* PDF frame responsive */
.pdf-frame {
  width: 100% !important;
  height: 70vh;
  border: 0;
  display: block;
}

/* Images: fit width + keep ratio */
.doc-thumb {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
}

/* Fix overflow from long file names */
.filename {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* PDF responsive behavior */
.pdf-frame {
  width: 100%;
  height: 70vh;
  border: 0;
  display: block;
}

/* On phones: hide iframe preview and use open button */
@media (max-width: 576px) {
  .pdf-frame { display: none !important; }
  .pdf-open-btn { display: inline-flex !important; }
}

@media (min-width: 577px) {
  .pdf-open-btn { display: none !important; }
}

