/* AdminConversationsTable Component Styles */

.admin-convs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-convs-table th,
.admin-convs-table td {
  border: 1px solid var(--clr-border);
  padding: 0.58rem 0.7rem;
  text-align: left;
  font-size: 0.95rem;
}

.admin-convs-table th {
  background: var(--clr-panel);
  color: var(--clr-text);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-convs-table tbody tr:nth-child(odd) {
  background: var(--clr-surface);
}

.admin-convs-table tbody tr:nth-child(even) {
  background: var(--clr-panel);
}

.admin-convs-table tbody tr:hover {
  background: color-mix(in oklab, var(--clr-accent) 10%, var(--clr-surface));
}

.admin-convs-table td {
  color: var(--clr-text);
}

/* ID columns - monospace for UUIDs */
.admin-convs-table td:nth-child(1),
.admin-convs-table td:nth-child(2) {
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.3;
  word-break: break-all;
  white-space: normal;
  padding: 0.4rem 0.5rem;
}

/* Column widths */
.admin-convs-table th:nth-child(1),
.admin-convs-table td:nth-child(1) {
  min-width: 80px;
  max-width: 100px;
} /* Conv ID */

.admin-convs-table th:nth-child(2),
.admin-convs-table td:nth-child(2) {
  min-width: 80px;
  max-width: 100px;
} /* User ID */

.admin-convs-table th:nth-child(3),
.admin-convs-table td:nth-child(3) {
  min-width: 200px;
  max-width: 250px;
  word-break: break-word;
} /* Email */

.admin-convs-table th:nth-child(4),
.admin-convs-table td:nth-child(4) {
  min-width: 70px;
  width: 70px;
} /* Mode */

.admin-convs-table th:nth-child(5),
.admin-convs-table td:nth-child(5) {
  min-width: 130px;
  max-width: 150px;
} /* Début */

.admin-convs-table th:nth-child(6),
.admin-convs-table td:nth-child(6) {
  min-width: 130px;
  max-width: 150px;
} /* Fin */

.admin-convs-table th:nth-child(7),
.admin-convs-table td:nth-child(7) {
  min-width: 80px;
  width: 80px;
} /* Statut */

.admin-convs-table th:nth-child(8),
.admin-convs-table td:nth-child(8) {
  min-width: 100px;
  width: 100px;
} /* Actions */

/* Actions column */
.admin-convs-table td.actions {
  white-space: nowrap;
  overflow: visible;
  position: relative;
}

/* Actions menu */
.actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 0.7rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 0.35rem;
  z-index: 50;
  min-width: 200px;
}

.actions-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--clr-text);
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  cursor: pointer;
  font-size: 0.92rem;
}

.actions-menu button:hover {
  background: var(--clr-panel);
}

.actions-menu .danger {
  color: #b91c1c;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-convs-table th:nth-child(1),
  .admin-convs-table td:nth-child(1) {
    min-width: 60px;
    max-width: 80px;
  }
  .admin-convs-table th:nth-child(2),
  .admin-convs-table td:nth-child(2) {
    min-width: 60px;
    max-width: 80px;
  }
  .admin-convs-table th:nth-child(3),
  .admin-convs-table td:nth-child(3) {
    min-width: 150px;
    max-width: 200px;
  }
}
