/* ==============================================
   roles.css - Roles Layout
   ============================================== */

/* ========================================
   ROLES LIST LAYOUT
   ======================================== */

.roles-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-list-item {
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--stroke);
}

.role-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

:root[data-theme="dark"] .role-list-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.role-list-item-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.role-list-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.role-list-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 200px;
}

.role-list-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.role-list-id {
  font-size: 0.75rem;
  color: var(--muted);
}

.role-list-id code {
  background: rgba(100, 116, 139, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

:root[data-theme="dark"] .role-list-id code {
  background: rgba(255, 255, 255, 0.05);
}

.role-list-description {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-list-item-content .btn-group {
  margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .role-list-item-content {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
  }

  .role-list-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: 1.25rem;
  }

  .role-list-info {
    flex: 1 1 calc(100% - 70px);
    min-width: 0;
  }

  .role-list-description {
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
  }

  .role-list-item-content .btn-group {
    order: 2;
    margin-left: 0;
  }
}
