/* CCAI_ADMIN_ACTIONS_VISIBILITY_FIX_START
   Correctif UI : rendre la colonne Actions de /admin lisible et exploitable.
   Objectif : boutons Modifier / Copier / Envoyer / Suspendre visibles sur desktop et mobile.
*/

.admin-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 8px !important;
}

.admin-table-wrap table.admin-table {
  width: max-content !important;
  min-width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: auto !important;
}

.admin-table:has(.admin-row-actions) {
  min-width: 1180px !important;
}

.admin-table:has(.admin-row-actions) th,
.admin-table:has(.admin-row-actions) td {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.admin-table:has(.admin-row-actions) th:last-child,
.admin-table:has(.admin-row-actions) td:last-child {
  position: sticky !important;
  right: 0 !important;
  z-index: 4 !important;
  width: 190px !important;
  min-width: 190px !important;
  max-width: 220px !important;
  background: #ffffff !important;
  box-shadow: -10px 0 18px rgba(11, 31, 51, 0.08) !important;
}

.admin-table:has(.admin-row-actions) thead th:last-child {
  z-index: 6 !important;
  background: #f7f5f0 !important;
}

.admin-row-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 160px !important;
}

.admin-row-actions .secondary-button,
.admin-row-actions .primary-button,
.admin-row-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 0 10px !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  font-size: 13px !important;
  line-height: 1.1 !important;
}

.admin-row-actions svg {
  flex: 0 0 auto !important;
}

/* Tablette : la colonne Actions reste visible, avec une largeur plus compacte. */
@media (max-width: 980px) {
  .admin-table:has(.admin-row-actions) {
    min-width: 1040px !important;
  }

  .admin-table:has(.admin-row-actions) th:last-child,
  .admin-table:has(.admin-row-actions) td:last-child {
    width: 176px !important;
    min-width: 176px !important;
  }
}

/* Mobile : on garde le scroll horizontal mais les actions restent accessibles Ã  droite. */
@media (max-width: 680px) {
  .admin-table-wrap {
    border-radius: 10px !important;
  }

  .admin-table:has(.admin-row-actions) {
    min-width: 980px !important;
  }

  .admin-table:has(.admin-row-actions) th:last-child,
  .admin-table:has(.admin-row-actions) td:last-child {
    width: 164px !important;
    min-width: 164px !important;
  }

  .admin-row-actions button {
    font-size: 12px !important;
    padding: 0 8px !important;
  }
}
/* CCAI_ADMIN_ACTIONS_VISIBILITY_FIX_END */