/* Roles Permissions Edit Page Styles */

/* Inline permission items for list view */
.list-inline-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px; /* row x column gap */
  padding-left: 0;
  align-items: center;
}

.list-inline-perms > li {
  margin-bottom: 0 !important;
  list-style: none;
  display: inline-flex;
  align-items: center;
}

/* Keep spacing tidy inside cards */
.permission-card-body .form-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto; /* don't stretch full width */
}

.permission-card-body .form-check-input {
  margin-top: 0;
}

.permission-card-body .form-check-label {
  font-size: 0.95rem;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

/* Fill the card body better in list view */
.permission-card-body {
  min-height: 48px;
}

/* Mobile view - Fix Manage Permissions and View buttons */
@media (max-width: 575.98px) {
  /* Actions column - allow wrapping and proper spacing */
  .table td:last-child {
    white-space: normal !important;
    min-width: 120px !important;
  }

  /* Button container in table actions - stack vertically */
  .table td:last-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
  }

  /* Buttons in actions column - full width on mobile */
  .table td:last-child .btn {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
  }

  /* Grid View and List View buttons on edit page */
  #viewGrid,
  #viewList {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Button group container */
  .d-flex.gap-2 {
    flex-wrap: wrap !important;
  }

  /* Select All / Deselect All buttons */
  #selectAll,
  #deselectAll {
    flex: 1 1 auto !important;
    min-width: 120px !important;
  }
}

