/* RSA Portal — responsive overrides (do not edit vendor style.css) */

html {
  -webkit-text-size-adjust: 100%;
}

img,
video,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

.card-img-top,
.rsa-card-img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover;
}

/* Prevent wide tables from clipping the shell */
.app-content,
.main-content.app-content,
.side-app,
.main-container.container-fluid {
  overflow-x: auto !important;
  max-width: 100%;
}

.page,
.page-main {
  max-width: 100%;
  overflow-x: clip;
}

/* Keep profile dropdown visible above header clipping */
.app-header.header.sticky,
.app-header .main-container,
.app-header .header-right-icons,
.app-header .responsive-navbar,
.app-header .navbar-collapse {
  overflow: visible !important;
}

.profile-1 .dropdown-menu {
  z-index: 1055 !important;
}

.rsa-page-top {
  padding-top: 1.15rem;
}

@media (max-width: 767.98px) {
  .rsa-page-top {
    padding-top: 0.85rem;
  }
}

.rsa-profile-avatar {
  object-fit: contain !important;
  background: #fff;
  border: 1px solid #e6e9f2;
  padding: 3px;
}

.rsa-banner-preview {
  width: 100%;
  min-height: 180px;
  max-height: 220px;
  flex: 0 0 auto;
}

.rsa-banner-preview img {
  width: 100%;
  max-height: 220px;
  height: 180px;
  object-fit: cover;
  display: block;
}

.rsa-banner-actions {
  position: relative;
  z-index: 2;
  clear: both;
}

.rsa-banner-card-media {
  overflow: hidden;
  border-radius: 0.5rem 0.5rem 0 0;
  background: #f4f6fb;
}

.rsa-banner-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.rsa-banner-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.6em;
}

.rsa-banner-card .card-body {
  padding: 1rem 1.1rem 1.15rem;
}

@media (max-width: 991.98px) {
  .rsa-banner-preview,
  .rsa-banner-preview img {
    min-height: 150px;
    max-height: 170px;
    height: 150px;
  }

  .rsa-banner-card-img {
    height: 150px;
  }
}

/* Tables */
.table-responsive,
.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.table {
  max-width: 100%;
}

@media (max-width: 767.98px) {
  table.table.text-nowrap {
    white-space: normal !important;
  }

  .dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
  }

  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length {
    float: none !important;
    text-align: left !important;
    margin-bottom: 0.5rem;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* Header / search */
  .main-header-center {
    display: none !important;
  }

  .app-header .header-right-icons .navbar-collapse {
    max-width: 100vw;
  }

  .app-sidebar {
    z-index: 1050;
  }

  /* Forms & filters */
  .form-group,
  .card-body .row > [class*="col-"] {
    margin-bottom: 0.75rem;
  }

  .btn,
  .login100-form-btn {
    max-width: 100%;
  }

  .btn-lg {
    width: 100%;
  }

  /* Cards / content spacing */
  .main-container.container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .card {
    margin-bottom: 1rem;
  }

  .card-header h3,
  .card-title {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  /* Select2 full width */
  .select2-container {
    width: 100% !important;
  }

  /* Footer */
  .footer {
    padding: 1rem 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 575.98px) {
  .wrap-login100 {
    width: 100% !important;
    margin: 0.5rem;
    padding: 1.25rem !important;
  }

  .container-login100 {
    padding: 0.75rem;
  }

  .login100-form-title {
    font-size: 1.35rem;
  }

  h1, h2, .h1, .h2 {
    font-size: 1.35rem;
  }

  h3, .h3 {
    font-size: 1.15rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

/* Horizontal scroll helper for any wide block */
.rsa-scroll-x {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Auto-scroll when a table sits directly in a card/tab without a wrapper */
.card-body:has(> table.table),
.tab-pane:has(> table.table),
.card-body .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.rsa-card-img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 0.25rem;
}

/* Profile account menu */
.profile-1 > .dropdown-toggle::after {
  display: none !important;
}
.profile-1 .dropdown-menu {
  z-index: 2000;
  min-width: 220px;
}
